lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <yo...@lucidworks.com>
Subject Re: question with ConjunctionTermScorer
Date Thu, 21 Feb 2013 15:22:16 GMT
Nice catch John!  Looks like this bug has been around a while.

I've opened this issue:
https://issues.apache.org/jira/browse/LUCENE-4791

-Yonik
http://lucidworks.com


On Thu, Feb 21, 2013 at 12:22 AM, John Wang <john.wang@gmail.com> wrote:
> Hi folks:
>
>     In the class ConjunctionTermScorer, method doNext, line 52, it looks
> like in the case where any of the sub iterators, e.g. docsAndFreqs[i].doc
> has reached to the end, e.g. returning NO_MORE_DOCS, the lead iterator would
> continue to scan/iterate through the posting list. Because the if block
> online 62 will always be triggering the break, and causing the lead iterator
> to scan.
>
>    Looks to me there should be either:
>
> 1) a check here for NO_MORE_DOCS and exit the top loop and terminate the
> iteration
> or
> 2) perhaps more optimal, if docsAndFreqs[i].doc > doc, we should let the
> lead.doc advance to that doc.
>
>     It is possible I am missing something. Any comments appreciated!
>
> Thanks
>
> -John
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message