Module org.apache.lucene.sandbox
Class VersionBlockTreeTermsWriter.TermsWriter
java.lang.Object
org.apache.lucene.sandbox.codecs.idversion.VersionBlockTreeTermsWriter.TermsWriter
- Enclosing class:
VersionBlockTreeTermsWriter
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final FixedBitSetprivate final FieldInfo(package private) longprivate final BytesRefBuilderprivate final ByteBuffersDataOutputprivate final List<VersionBlockTreeTermsWriter.PendingBlock> private longprivate final List<VersionBlockTreeTermsWriter.PendingEntry> private int[]private final ByteBuffersDataOutput -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfinish()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
-
indexStartFP
long indexStartFP -
lastTerm
-
prefixStarts
private int[] prefixStarts -
pending
-
newBlocks
-
firstPendingTerm
-
lastPendingTerm
-
suffixWriter
-
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 VersionBlockTreeTermsWriter.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
-