lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1065262 - in /lucene/dev/branches/branch_3x: ./ lucene/ lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java solr/
Date Sun, 30 Jan 2011 13:07:00 GMT
Author: rmuir
Date: Sun Jan 30 13:07:00 2011
New Revision: 1065262

URL: http://svn.apache.org/viewvc?rev=1065262&view=rev
Log:
LUCENE-2896: in advance(), don't skip when target doc delta is very small

Modified:
    lucene/dev/branches/branch_3x/   (props changed)
    lucene/dev/branches/branch_3x/lucene/   (props changed)
    lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java
    lucene/dev/branches/branch_3x/solr/   (props changed)

Modified: lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java?rev=1065262&r1=1065261&r2=1065262&view=diff
==============================================================================
--- lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java
(original)
+++ lucene/dev/branches/branch_3x/lucene/src/java/org/apache/lucene/index/SegmentTermDocs.java
Sun Jan 30 13:07:00 2011
@@ -183,7 +183,7 @@ class SegmentTermDocs implements TermDoc
 
   /** Optimized implementation. */
   public boolean skipTo(int target) throws IOException {
-    if (df >= skipInterval) {                      // optimized case
+    if ((target - skipInterval) >= doc && df >= skipInterval) {           
          // optimized case
       if (skipListReader == null)
         skipListReader = new DefaultSkipListReader((IndexInput) freqStream.clone(), maxSkipLevels,
skipInterval); // lazily clone
 



Mime
View raw message