class VersionBlockTreeTermsWriter.TermsWriter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private RAMOutputStream |
bytesWriter |
(package private) FixedBitSet |
docsSeen |
private FieldInfo |
fieldInfo |
private VersionBlockTreeTermsWriter.PendingTerm |
firstPendingTerm |
(package private) long |
indexStartFP |
private VersionBlockTreeTermsWriter.PendingTerm |
lastPendingTerm |
private BytesRefBuilder |
lastTerm |
private long[] |
longs |
private int |
longsSize |
private RAMOutputStream |
metaWriter |
private java.util.List<VersionBlockTreeTermsWriter.PendingBlock> |
newBlocks |
private long |
numTerms |
private java.util.List<VersionBlockTreeTermsWriter.PendingEntry> |
pending |
private int[] |
prefixStarts |
private RAMOutputStream |
suffixWriter |
Constructor and Description |
---|
TermsWriter(FieldInfo fieldInfo) |
Modifier and Type | Method and Description |
---|---|
void |
finish() |
private void |
pushTerm(BytesRef text)
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.
|
private VersionBlockTreeTermsWriter.PendingBlock |
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.
|
private final FieldInfo fieldInfo
private final int longsSize
private long numTerms
final FixedBitSet docsSeen
long indexStartFP
private final BytesRefBuilder lastTerm
private int[] prefixStarts
private final long[] longs
private final java.util.List<VersionBlockTreeTermsWriter.PendingEntry> pending
private final java.util.List<VersionBlockTreeTermsWriter.PendingBlock> newBlocks
private VersionBlockTreeTermsWriter.PendingTerm firstPendingTerm
private VersionBlockTreeTermsWriter.PendingTerm lastPendingTerm
private final RAMOutputStream suffixWriter
private final RAMOutputStream metaWriter
private final RAMOutputStream bytesWriter
TermsWriter(FieldInfo fieldInfo)
void writeBlocks(int prefixLength, int count) throws java.io.IOException
java.io.IOException
private VersionBlockTreeTermsWriter.PendingBlock writeBlock(int prefixLength, boolean isFloor, int floorLeadLabel, int start, int end, boolean hasTerms, boolean hasSubBlocks) throws java.io.IOException
java.io.IOException
public void write(BytesRef text, TermsEnum termsEnum, NormsProducer norms) throws java.io.IOException
java.io.IOException
private void pushTerm(BytesRef text) throws java.io.IOException
java.io.IOException
public void finish() throws java.io.IOException
java.io.IOException