lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug Cutting <>
Subject Re: DO NOT REPLY [Bug 32965] - Use filter bits for next() and skipTo() in FilteredQuery
Date Thu, 06 Jan 2005 21:14:38 GMT wrote:
> ------- Additional Comments From  2005-01-06 20:13 -------
> Patch to to use FilteredQuery

I like where this is going, and want to take it further!

Why not patch instead of  Once that's 
done, Filters could be removed from the Searchable interface and only 
appear (for back-compatibility and/or convenience) in Searcher utility 

This would simplify auto-filtering.  Instead of a Query -> Query+Filter 
transformation, we could just use a Query -> Query transformation.  For 
example, the rewrite method on BooleanQuery could look for clauses which 
are somehow declared non-scoring (e.g., boost=0) and, when these exist, 
rewrite itself as a FilteredQuery, constructing a Filter for all of the 
non-scoring clauses.

There's still the issue of caching filters.  This might be as simple as:
(a) combine the caches used by QueryFilter and CachingWrappingFilter;
(b) implement the unified cache as an LRU, possibly taking into account 
different filter sizes, etc.
(c) add a Query.getFilterBits(IndexReader, DocIdCollector)  method 
that's implemented with a Scorer by default, but which may be optimized, 
e.g., for RangeQuery, TermQuery, etc.
(d) write a BooleanQueryFilter implementation that uses 
Query.getFilterBits() to combine a number of clauses into a single 
bit-vector that can be cached.

Does this make any sense?


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

View raw message