But I'll reiterate what Doug says... be sure to save off the filter instance so you don't take the filtering performance hit for the same date ranges on later searches.
Erik
On Wednesday, September 17, 2003, at 11:57 AM, Doug Cutting wrote:
Killeen, Tom wrote:My query would look something like this: LongTitle:killeen AND
LongTitle:state AND StateDistrict:id AND FiledDate:["1997-01-01" TO
"2002-04-04"] and it returned in 5.7 seconds
Does anyone have any suggestions for searching date ranges. Our ranges will
generally be between a 3 - 7 year period.
If you use the same date range repeatedly then you can make things fast by replacing it with a filter that you re-use. Try using a QueryFilter with your date range query as the query. Save the QueryFilter object and use it again with future queries. The first query will be slow, but subsequent queries will use the cached results of the first.
This is the recommended way to implement a "within the last month", "within the last year", etc. feature. You could even pre-fetch the filter whenever you update the index, by evaluating a query before you put a new IndexReader in production, so that even the first real user query is fast.
Doug
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
