mirror of https://github.com/apache/lucene.git
fixed loop exit in skipTo in case of end of
skip table git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150292 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bbbd0fb408
commit
0adb0734e2
|
@ -159,13 +159,16 @@ class SegmentTermDocs implements TermDocs {
|
|||
long lastProxPointer = -1;
|
||||
int numSkipped = -1 - (count % skipInterval);
|
||||
|
||||
while (target > skipDoc && skipCount < numSkips) {
|
||||
while (target > skipDoc) {
|
||||
lastSkipDoc = skipDoc;
|
||||
lastFreqPointer = freqPointer;
|
||||
lastProxPointer = proxPointer;
|
||||
|
||||
|
||||
if (skipDoc != 0 && skipDoc >= doc)
|
||||
numSkipped += skipInterval;
|
||||
|
||||
if(skipCount >= numSkips)
|
||||
break;
|
||||
|
||||
skipDoc += skipStream.readVInt();
|
||||
freqPointer += skipStream.readVInt();
|
||||
|
|
Loading…
Reference in New Issue