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 FixedBitSetprivate final FieldInfoprivate final BytesRefBuilderprivate final ByteBuffersDataOutputprivate final List<Lucene90BlockTreeTermsWriter.PendingBlock> private longprivate final List<Lucene90BlockTreeTermsWriter.PendingEntry> private int[]private byte[]private final ByteBuffersDataOutputprivate final ByteBuffersDataOutputprivate final ByteBuffersDataOutputprivate final BytesRefBuilder(package private) long(package private) long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanallEqual(byte[] b, int startOffset, int endOffset, byte value) voidfinish()private voidPushes the new term to the top of the stack, and writes new blocks.voidwrite(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) voidwriteBlocks(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
-