Module org.apache.lucene.codecs
Class SimpleTextFieldsWriter
java.lang.Object
org.apache.lucene.codecs.FieldsConsumer
org.apache.lucene.codecs.simpletext.SimpleTextFieldsWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CompetitiveImpactAccumulator(package private) static final BytesRefprivate intfor write skip data.(package private) static final BytesRef(package private) static final BytesRef(package private) static final BytesRef(package private) static final BytesRefprivate longprivate IndexOutput(package private) static final BytesRef(package private) static final BytesRefprivate final BytesRefBuilder(package private) final Stringprivate final SimpleTextSkipWriter(package private) static final BytesRef(package private) static final BytesRefprivate final SegmentWriteState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()private longgetNorm(int doc, NumericDocValues norms) private voidnewline()private voidvoidwrite(FieldInfos fieldInfos, Fields fields, NormsProducer normsProducer) voidwrite(Fields fields, NormsProducer norms) Write all fields, terms and postings.private voidMethods inherited from class org.apache.lucene.codecs.FieldsConsumer
merge
-
Field Details
-
out
-
scratch
-
writeState
-
segment
-
docCount
private int docCountfor write skip data. -
skipWriter
-
competitiveImpactAccumulator
-
lastDocFilePointer
private long lastDocFilePointer -
END
-
FIELD
-
TERM
-
DOC
-
FREQ
-
POS
-
START_OFFSET
-
END_OFFSET
-
PAYLOAD
-
-
Constructor Details
-
SimpleTextFieldsWriter
- Throws:
IOException
-
-
Method Details
-
write
Description copied from class:FieldsConsumerWrite all fields, terms and postings. This the "pull" API, allowing you to iterate more than once over the postings, somewhat analogous to using a DOM API to traverse an XML tree.Notes:
- You must compute index statistics, including each Term's docFreq and totalTermFreq, as well as the summary sumTotalTermFreq, sumTotalDocFreq and docCount.
- You must skip terms that have no docs and fields that have no terms, even though the provided Fields API will expose them; this typically requires lazily writing the field or term until you've actually seen the first term or document.
- The provided Fields instance is limited: you cannot call any methods that return statistics/counts; you cannot pass a non-null live docs when pulling docs/positions enums.
- Specified by:
writein classFieldsConsumer- Throws:
IOException
-
write
public void write(FieldInfos fieldInfos, Fields fields, NormsProducer normsProducer) throws IOException - Throws:
IOException
-
write
- Throws:
IOException
-
write
- Throws:
IOException
-
newline
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classFieldsConsumer- Throws:
IOException
-
getNorm
- Throws:
IOException
-