[ 
https://issues.apache.org/jira/browse/LUCENE-912?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Busch updated LUCENE-912:
---------------------------------

    Attachment: lucene-912.patch

In BooleanScorer2.score() the coordinator is initialized: coordinator.initDoc();
This results in Coordinator.nrMatchers = 0. 

Now look at the statements that change the value of nrMatchers in BooleanScorer.
There are three of those. E. g. in countingDisjunctionSumScorer:
        if (this.doc() > lastScoredDoc) {
          lastScoredDoc = this.doc();
          coordinator.nrMatchers += super.nrMatchers;
        }
                
nrMatchers is only increased in case this.doc() is greater than lastScoredDoc.
But if score() is called twice, than those values are equal. So we have to
fix the if statement to 
        if (this.doc() >= lastScoredDoc) {

With this patch and dismax_skipto.patch now all tests pass (including your
new ones, Doron).


> DisjunctionMaxScorer.skipTo has bug that keeps it from skipping
> ---------------------------------------------------------------
>
>                 Key: LUCENE-912
>                 URL: https://issues.apache.org/jira/browse/LUCENE-912
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.0.0, 2.1
>            Reporter: Hoss Man
>             Fix For: 2.2
>
>         Attachments: checkTwoCallsToScore.patch, checkTwoCallsToScore.patch, 
> dismax_skipto.patch, lucene-912.patch
>
>
> as reported on the mailing list, DisjunctionMaxScorer.skipTo is broken if 
> called before next in some situations...
> http://www.nabble.com/Potential-issue-with-DisjunctionMaxScorer-tf3846366.html#a10894987

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to