mirror of https://github.com/apache/lucene.git
LUCENE-6898: Don't fully read the last stored field value from disk if the StoredFieldVisitor doesn't want it.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1715299 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
766b017b1a
commit
44b232f6f8
|
@ -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
|
||||
|
|
|
@ -304,7 +304,7 @@ public final class CompressingStoredFieldsReader extends StoredFieldsReader {
|
|||
}
|
||||
|
||||
/**
|
||||
* 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 CompressingStoredFieldsReader extends StoredFieldsReader {
|
|||
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:
|
||||
|
|
Loading…
Reference in New Issue