public class FSTTermsWriter extends FieldsConsumer
File:
The .tst contains a list of FSTs, one for each field. The FST maps a term to its corresponding statistics (e.g. docfreq) and metadata (e.g. information for postings list reader like file pointer to postings list).
Typically the metadata is separated into two parts:
FST<TermData>IndexHeaderUint64VIntVLongNotes:
| Modifier and Type | Class and Description |
|---|---|
private static class |
FSTTermsWriter.FieldMetaData |
(package private) class |
FSTTermsWriter.TermsWriter |
| Modifier and Type | Field and Description |
|---|---|
(package private) FieldInfos |
fieldInfos |
(package private) java.util.List<FSTTermsWriter.FieldMetaData> |
fields |
(package private) int |
maxDoc |
(package private) IndexOutput |
out |
(package private) PostingsWriterBase |
postingsWriter |
(package private) static java.lang.String |
TERMS_CODEC_NAME |
(package private) static java.lang.String |
TERMS_EXTENSION |
static int |
TERMS_VERSION_CURRENT |
static int |
TERMS_VERSION_START |
| Constructor and Description |
|---|
FSTTermsWriter(SegmentWriteState state,
PostingsWriterBase postingsWriter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
write(Fields fields,
NormsProducer norms)
Write all fields, terms and postings.
|
private void |
writeTrailer(IndexOutput out,
long dirStart) |
mergestatic final java.lang.String TERMS_EXTENSION
static final java.lang.String TERMS_CODEC_NAME
public static final int TERMS_VERSION_START
public static final int TERMS_VERSION_CURRENT
final PostingsWriterBase postingsWriter
final FieldInfos fieldInfos
IndexOutput out
final int maxDoc
final java.util.List<FSTTermsWriter.FieldMetaData> fields
public FSTTermsWriter(SegmentWriteState state, PostingsWriterBase postingsWriter) throws java.io.IOException
java.io.IOExceptionprivate void writeTrailer(IndexOutput out, long dirStart) throws java.io.IOException
java.io.IOExceptionpublic void write(Fields fields, NormsProducer norms) throws java.io.IOException
FieldsConsumerNotes:
write in class FieldsConsumerjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class FieldsConsumerjava.io.IOException