I want to execute a search that matchs documents within an date range. Now i have two ways to accomplish it, and the one is to use DateFilte, the other is to use RangeQuery. My question is which one is more effective? |
If you are going to use the same DateRange over and over, create a filter and cache it for reuse. If you have varying date ranges, it might be easiest to use Range Queries, although using them on simple Date fields will cause problems. |