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
public final class Lucene90PostingsWriter extends PushPostingsWriterBase
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:
for details about skipping setting and postings layout.- 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 Constructor Description Lucene90PostingsWriter(SegmentWriteState state)Creates a postings writer
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddPosition(int position, BytesRef payload, int startOffset, int endOffset)voidclose()voidencodeTerm(DataOutput out, FieldInfo fieldInfo, BlockTermState _state, boolean absolute)voidfinishDoc()voidfinishTerm(BlockTermState _state)Called when we are done adding docs to this termvoidinit(IndexOutput termsOut, SegmentWriteState state)Lucene90PostingsFormat.IntBlockTermStatenewTermState()voidsetField(FieldInfo fieldInfo)voidstartDoc(int docID, int termDocFreq)voidstartTerm(NumericDocValues norms)-
Methods inherited from class org.apache.lucene.codecs.PushPostingsWriterBase
writeTerm
-
-
-
-
Constructor Detail
-
Lucene90PostingsWriter
public Lucene90PostingsWriter(SegmentWriteState state) throws IOException
Creates a postings writer- Throws:
IOException
-
-
Method Detail
-
newTermState
public Lucene90PostingsFormat.IntBlockTermState newTermState()
- Specified by:
newTermStatein classPushPostingsWriterBase
-
init
public void init(IndexOutput termsOut, SegmentWriteState state) throws IOException
- Specified by:
initin classPostingsWriterBase- Throws:
IOException
-
setField
public void setField(FieldInfo fieldInfo)
- Overrides:
setFieldin classPushPostingsWriterBase
-
startTerm
public void startTerm(NumericDocValues norms)
- Specified by:
startTermin classPushPostingsWriterBase
-
startDoc
public void startDoc(int docID, int termDocFreq) throws IOException- 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
public void finishDoc() throws IOException- Specified by:
finishDocin classPushPostingsWriterBase- Throws:
IOException
-
finishTerm
public void finishTerm(BlockTermState _state) throws IOException
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
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classPostingsWriterBase- Throws:
IOException
-
-