lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gol...@apache.org
Subject cvs commit: jakarta-lucene/src/java/org/apache/lucene/index SegmentTermDocs.java
Date Mon, 19 Apr 2004 19:32:20 GMT
goller      2004/04/19 12:32:20

  Modified:    src/java/org/apache/lucene/index SegmentTermDocs.java
  Log:
  fixed loop exit in skipTo in case of end of
  skip table
  
  Revision  Changes    Path
  1.11      +5 -2      jakarta-lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java
  
  Index: SegmentTermDocs.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- SegmentTermDocs.java	19 Apr 2004 14:46:00 -0000	1.10
  +++ SegmentTermDocs.java	19 Apr 2004 19:32:20 -0000	1.11
  @@ -159,13 +159,16 @@
         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();
  
  
  

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


Mime
View raw message