Class OrdsBlockTreeTermsWriter.TermsWriter
java.lang.Object
org.apache.lucene.codecs.blocktreeords.OrdsBlockTreeTermsWriter.TermsWriter
- Enclosing class:
- OrdsBlockTreeTermsWriter
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final FixedBitSet
private final FieldInfo
(package private) long
private final BytesRefBuilder
private final ByteBuffersDataOutput
private final List<OrdsBlockTreeTermsWriter.PendingBlock>
private long
private final List<OrdsBlockTreeTermsWriter.PendingEntry>
private int[]
private final ByteBuffersDataOutput
private final ByteBuffersDataOutput
(package private) long
(package private) long
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 -
indexStartFP
long indexStartFP -
lastTerm
-
prefixStarts
private int[] prefixStarts -
pending
-
newBlocks
-
firstPendingTerm
-
lastPendingTerm
-
suffixWriter
-
statsWriter
-
metaWriter
-
-
Constructor Details
-
TermsWriter
TermsWriter(FieldInfo fieldInfo)
-
-
Method Details
-
writeBlocks
Writes the top count entries in pending, using prevTerm to compute the prefix.- Throws:
IOException
-
writeBlock
private OrdsBlockTreeTermsWriter.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
-