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.
Regards,
Paul Elschot
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]