lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsmi...@apache.org
Subject svn commit: r1715299 - in /lucene/dev/trunk/lucene: CHANGES.txt core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsReader.java
Date Thu, 19 Nov 2015 22:33:47 GMT
Author: dsmiley
Date: Thu Nov 19 22:33:47 2015
New Revision: 1715299

URL: http://svn.apache.org/viewvc?rev=1715299&view=rev
Log:
LUCENE-6898: Don't fully read the last stored field value from disk if the StoredFieldVisitor
doesn't want it.

Modified:
    lucene/dev/trunk/lucene/CHANGES.txt
    lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsReader.java

Modified: lucene/dev/trunk/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/CHANGES.txt?rev=1715299&r1=1715298&r2=1715299&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/CHANGES.txt (original)
+++ lucene/dev/trunk/lucene/CHANGES.txt Thu Nov 19 22:33:47 2015
@@ -220,6 +220,10 @@ Optimizations
 * LUCENE-6276: Added TwoPhaseIterator.matchCost() which allows to confirm the
   least costly TwoPhaseIterators first. (Paul Elschot via Adrien Grand)
 
+* LUCENE-6898: In the default codec, the last stored field value will not
+  be fully read from disk if the supplied StoredFieldVisitor doesn't want it.
+  So put your largest text field value last to benefit. (David Smiley)
+
 Bug Fixes
 
 * LUCENE-6817: ComplexPhraseQueryParser.ComplexPhraseQuery does not display 

Modified: lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsReader.java?rev=1715299&r1=1715298&r2=1715299&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsReader.java
(original)
+++ lucene/dev/trunk/lucene/core/src/java/org/apache/lucene/codecs/compressing/CompressingStoredFieldsReader.java
Thu Nov 19 22:33:47 2015
@@ -304,7 +304,7 @@ public final class CompressingStoredFiel
   }
 
   /**
-   * Reads a long in a variable-length format.  Reads between one and
+   * Reads a long in a variable-length format.  Reads between one andCorePropLo
    * nine bytes. Small values typically take fewer bytes.
    */
   static long readTLong(DataInput in) throws IOException {
@@ -595,6 +595,9 @@ public final class CompressingStoredFiel
           readField(doc.in, visitor, fieldInfo, bits);
           break;
         case NO:
+          if (fieldIDX == doc.numStoredFields - 1) {// don't skipField on last field value;
treat like STOP
+            return;
+          }
           skipField(doc.in, bits);
           break;
         case STOP:



Mime
View raw message