Module org.apache.lucene.core
Class Lucene90BlockTreeTermsWriter.TermsWriter
java.lang.Object
org.apache.lucene.codecs.lucene90.blocktree.Lucene90BlockTreeTermsWriter.TermsWriter
- Enclosing class:
- Lucene90BlockTreeTermsWriter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LZ4.HighCompressionHashTable
(package private) final FixedBitSet
private final FieldInfo
private final BytesRefBuilder
private final ByteBuffersDataOutput
private final List<Lucene90BlockTreeTermsWriter.PendingBlock>
private long
private final List<Lucene90BlockTreeTermsWriter.PendingEntry>
private int[]
private byte[]
private final ByteBuffersDataOutput
private final ByteBuffersDataOutput
private final ByteBuffersDataOutput
private final BytesRefBuilder
(package private) long
(package private) long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
allEqual
(byte[] b, int startOffset, int endOffset, byte value) void
finish()
private void
Pushes the new term to the top of the stack, and writes new blocks.void
write
(BytesRef text, TermsEnum termsEnum, NormsProducer norms) Writes one term's worth of postings.writeBlock
(int prefixLength, boolean isFloor, int floorLeadLabel, int start, int end, boolean hasTerms, boolean hasSubBlocks) Writes the specified slice (start is inclusive, end is exclusive) from pending stack as a new block.(package private) void
writeBlocks
(int prefixLength, int count) Writes the top count entries in pending, using prevTerm to compute the prefix.
-
Field Details
-
fieldInfo
-
numTerms
private long numTerms -
docsSeen
-
sumTotalTermFreq
long sumTotalTermFreq -
sumDocFreq
long sumDocFreq -
lastTerm
-
prefixStarts
private int[] prefixStarts -
pending
-
newBlocks
-
firstPendingTerm
-
lastPendingTerm
-
suffixLengthsWriter
-
suffixWriter
-
statsWriter
-
metaWriter
-
spareWriter
-
spareBytes
private byte[] spareBytes -
compressionHashTable
-
-
Constructor Details
-
TermsWriter
TermsWriter(FieldInfo fieldInfo)
-
-
Method Details
-
writeBlocks
Writes the top count entries in pending, using prevTerm to compute the prefix.- Throws:
IOException
-
allEqual
private boolean allEqual(byte[] b, int startOffset, int endOffset, byte value) -
writeBlock
private Lucene90BlockTreeTermsWriter.PendingBlock writeBlock(int prefixLength, boolean isFloor, int floorLeadLabel, int start, int end, boolean hasTerms, boolean hasSubBlocks) throws IOException Writes the specified slice (start is inclusive, end is exclusive) from pending stack as a new block. If isFloor is true, there were too many (more than maxItemsInBlock) entries sharing the same prefix, and so we broke it into multiple floor blocks where we record the starting label of the suffix of each floor block.- Throws:
IOException
-
write
Writes one term's worth of postings.- Throws:
IOException
-
pushTerm
Pushes the new term to the top of the stack, and writes new blocks.- Throws:
IOException
-
finish
- Throws:
IOException
-