ok , i see, thanks for hand holding here.

the simplest solution would be (without making another bigger/riskier patch):

- commit LUCENE-584 as is; no harm to anyone but some temporary complexity in 
IndexSearcher

- commit   LUCENE-730 - does no harm

- open new Jura issue "Simplify Filter usage in IndexSearcher" and re-factor 
Filter to behave as Hoss mentioned  it


----- Original Message ----
From: Paul Elschot <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Friday, 13 April, 2007 11:05:10 PM
Subject: Re: [jira] Commented: (LUCENE-584) Decouple Filter from BitSet; 
relation with LUCENE-730

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]






      ___________________________________________________________
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to