lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: RE : RE : BooleanQuery/Clauses with Linked Filters
Date Wed, 25 Feb 2004 18:25:55 GMT
On Feb 25, 2004, at 11:51 AM, Rasik Pandey wrote:
> Our particular case concerns adding or doing a "date query" for which 
> we are using a DateFilter. We were using a DateFilter to represent one 
> of the nested sub-queries, but since that is only possible at the same 
> level of a complex parent BooleanQuery, this obviously would affect 
> the results globally instead of respecting the nesting.  Maybe the 
> answer is the RangeQuery? I need to research that....

Yeah, RangeQuery sounds like the right thing to do in your case.

> In general, what is the performance gain, if any, when using a Filter 
> vs. adding an extra BooleanClause to retrieve the same results?

I'm not sure it can be generalized - it would depend on the query and 
the filter you're comparing.  But generally a Filter has upfront work 
to do to create the filter bit set.  For a DateFilter, this involves 
enumerating the terms in the range.  The QueryFilter performs an actual 
query, so it would be dependent on what it needed to do.

Filters are good when you can create them and let them live over the 
the course of multiple queries.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message