Class Lucene90PostingsWriter
java.lang.Object
org.apache.lucene.codecs.PostingsWriterBase
org.apache.lucene.codecs.PushPostingsWriterBase
org.apache.lucene.backward_codecs.lucene90.Lucene90PostingsWriter
- All Implemented Interfaces:
Closeable,AutoCloseable
Concrete class that writes docId(maybe frq,pos,offset,payloads) list with postings format.
Postings list for each term will be stored separately.
- See Also:
- WARNING: This API is experimental and might change in incompatible ways in the next release.
-
Field Summary
Fields inherited from class org.apache.lucene.codecs.PushPostingsWriterBase
fieldInfo, indexOptions, writeFreqs, writeOffsets, writePayloads, writePositions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPosition(int position, BytesRef payload, int startOffset, int endOffset) voidclose()voidencodeTerm(DataOutput out, FieldInfo fieldInfo, BlockTermState _state, boolean absolute) voidvoidfinishTerm(BlockTermState _state) Called when we are done adding docs to this termvoidinit(IndexOutput termsOut, SegmentWriteState state) voidvoidstartDoc(int docID, int termDocFreq) voidstartTerm(NumericDocValues norms) Methods inherited from class org.apache.lucene.codecs.PushPostingsWriterBase
writeTerm
-
Constructor Details
-
Lucene90PostingsWriter
Creates a postings writer- Throws:
IOException
-
-
Method Details
-
newTermState
- Specified by:
newTermStatein classPushPostingsWriterBase
-
init
- Specified by:
initin classPostingsWriterBase- Throws:
IOException
-
setField
- Overrides:
setFieldin classPushPostingsWriterBase
-
startTerm
- Specified by:
startTermin classPushPostingsWriterBase
-
startDoc
- Specified by:
startDocin classPushPostingsWriterBase- Throws:
IOException
-
addPosition
public void addPosition(int position, BytesRef payload, int startOffset, int endOffset) throws IOException - Specified by:
addPositionin classPushPostingsWriterBase- Throws:
IOException
-
finishDoc
- Specified by:
finishDocin classPushPostingsWriterBase- Throws:
IOException
-
finishTerm
Called when we are done adding docs to this term- Specified by:
finishTermin classPushPostingsWriterBase- Throws:
IOException
-
encodeTerm
public void encodeTerm(DataOutput out, FieldInfo fieldInfo, BlockTermState _state, boolean absolute) throws IOException - Specified by:
encodeTermin classPostingsWriterBase- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classPostingsWriterBase- Throws:
IOException
-