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:
Christoph Goller 2004-04-19 19:32:20 +00:00
parent bbbd0fb408
commit 0adb0734e2
1 changed files with 5 additions and 2 deletions

View File

@ -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();