mirror of
https://github.com/apache/lucene.git
synced 2025-02-08 02:58:58 +00:00
LUCENE-2905: don't write abs skip pointer until we have to, the block might be all low-freq terms
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1071593 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
07aca888ba
commit
28cf54a4cc
@ -242,7 +242,7 @@ public class SepPostingsReaderImpl extends PostingsReaderBase {
|
|||||||
}
|
}
|
||||||
//System.out.println(" skipFP=" + termState.skipFP);
|
//System.out.println(" skipFP=" + termState.skipFP);
|
||||||
} else if (isFirstTerm) {
|
} else if (isFirstTerm) {
|
||||||
termState.skipFP = termState.bytesReader.readVLong();
|
termState.skipFP = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -289,12 +289,8 @@ public final class SepPostingsWriterImpl extends PostingsWriterBase {
|
|||||||
}
|
}
|
||||||
lastSkipFP = skipFP;
|
lastSkipFP = skipFP;
|
||||||
} else if (isFirstTerm) {
|
} else if (isFirstTerm) {
|
||||||
// TODO: this is somewhat wasteful; eg if no terms in
|
// lazily write an absolute delta if a term in this block requires skip data.
|
||||||
// this block will use skip data, we don't need to
|
lastSkipFP = 0;
|
||||||
// write this:
|
|
||||||
final long skipFP = skipOut.getFilePointer();
|
|
||||||
indexBytesWriter.writeVLong(skipFP);
|
|
||||||
lastSkipFP = skipFP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
lastDocID = 0;
|
lastDocID = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user