LUCENE-2905: when no payloads exist, avoid writing wasted pyl pointer deltas in the skipdata

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1071382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2011-02-16 20:19:46 +00:00
parent 0da6f25e6b
commit 88d04cdf50
2 changed files with 6 additions and 2 deletions

View File

@ -197,7 +197,9 @@ class SepSkipListReader extends MultiLevelSkipListReader {
docIndex[level].read(skipStream, false);
if (!omitTF) {
posIndex[level].read(skipStream, false);
payloadPointer[level] += skipStream.readVInt();
if (currentFieldStoresPayloads) {
payloadPointer[level] += skipStream.readVInt();
}
}
return delta;

View File

@ -188,7 +188,9 @@ class SepSkipListWriter extends MultiLevelSkipListWriter {
if (!omitTF) {
posIndex[level].mark();
posIndex[level].write(skipBuffer, false);
skipBuffer.writeVInt((int) (curPayloadPointer - lastSkipPayloadPointer[level]));
if (curStorePayloads) {
skipBuffer.writeVInt((int) (curPayloadPointer - lastSkipPayloadPointer[level]));
}
}
lastSkipDoc[level] = curDoc;