lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: [jira] Commented: (LUCENE-584) Decouple Filter from BitSet; relation with LUCENE-730
Date Fri, 13 Apr 2007 21:05:10 GMT
On Friday 13 April 2007 22:10, eks dev wrote:
> Hoss, would this work (is this what you said)? 
> public BitSet bits(IndexReader reader) throws IOException{
>  return null;
> }
> public Matcher getMatcher(IndexReader reader) throws IOException {
>   if(bits() == null) throw new SomeException("Filter must implement at least 
one of..."); 
>   return new BitsMatcher(bits());
> }

This will not work correctly when the Scorer for the query that is searched
with a filter does not implement skipTo(), for example BooleanScorer.
See also the javadoc of class IndexSearcher in the patch.

LUCENE-730 explicitly uses BooleanScorer, but only for the non filtered case
with a top level disjunction.

I think that with LUCENE-730 also added, the filtered case with BooleanScorer 
would go away, allowing to simplify this logic in IndexSearcher.
This simplification of IndexSearcher is not in the LUCENE-730 patch, because 
LUCENE-584 is not committed. At the moment I don't know precisely what
IndexSearcher would look like after LUCENE-730.

With LUCENE-730 BooleanScorer.setUseScorer14() could also be 
removed/deprecated, but that is also not yet in the LUCENE-730 patch.

Paul Elschot

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

View raw message