If I haven't been recently looking at some of these scorers, it takes
a while to wrap my head around them again.
It would be really helpful if you could provide a unit test that shows
the failure, and attach it to a JIRA issue.
-Yonik
On 5/31/07, balasubramanian sudaakeran <[EMAIL PROTECTED]> wrote:
Hi,
I found the following piece of logic in DisjunctionMaxScorer.skipTo function which may have a potential
issue (marked in code as <<<<ISSUE>>>>).
public boolean skipTo(int target) throws IOException {
if (firstTime) {
if (!more) return false;
heapify();
firstTime = false;
return true; // more would have been false if no subScorers had any
docs
<<<<ISSUE>>>> The issue is that we should not have his return statement
over here. It should continue on the rest of the logic. Otherwise firsttime the skipping to target will
not happen.
}
while (subScorers.size()>0 && ((Scorer)subScorers.get(0)).doc()<target)
{
if (((Scorer)subScorers.get(0)).skipTo(target))
heapAdjust(0);
else
heapRemoveRoot();
}
if ((subScorers.size()==0))
return (more = false);
return true;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]