Google Blogoscoped


In lucene searching, DateFilter vs RangeQuery, which one is faster?

Xiaodong XU [PersonRank 0]

Wednesday, December 8, 2004
18 years ago

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?

Greg Gershman [PersonRank 1]

18 years ago #

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.

Forum home


Blog  |  Forum     more >> Archive | Feed | Google's blogs | About


This site unofficially covers Google™ and more with some rights reserved. Join our forum!