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 void
addPosition(int position, BytesRef payload, int startOffset, int endOffset)
void
close()
void
encodeTerm(DataOutput out, FieldInfo fieldInfo, BlockTermState _state, boolean absolute)
void
finishDoc()
void
finishTerm(BlockTermState _state)
Called when we are done adding docs to this termvoid
init(IndexOutput termsOut, SegmentWriteState state)
Lucene90PostingsFormat.IntBlockTermState
newTermState()
void
setField(FieldInfo fieldInfo)
void
startDoc(int docID, int termDocFreq)
void
startTerm(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:
newTermState
in classPushPostingsWriterBase
-
init
public void init(IndexOutput termsOut, SegmentWriteState state) throws IOException
- Specified by:
init
in classPostingsWriterBase
- Throws:
IOException
-
setField
public void setField(FieldInfo fieldInfo)
- Overrides:
setField
in classPushPostingsWriterBase
-
startTerm
public void startTerm(NumericDocValues norms)
- Specified by:
startTerm
in classPushPostingsWriterBase
-
startDoc
public void startDoc(int docID, int termDocFreq) throws IOException
- Specified by:
startDoc
in classPushPostingsWriterBase
- Throws:
IOException
-
addPosition
public void addPosition(int position, BytesRef payload, int startOffset, int endOffset) throws IOException
- Specified by:
addPosition
in classPushPostingsWriterBase
- Throws:
IOException
-
finishDoc
public void finishDoc() throws IOException
- Specified by:
finishDoc
in classPushPostingsWriterBase
- Throws:
IOException
-
finishTerm
public void finishTerm(BlockTermState _state) throws IOException
Called when we are done adding docs to this term- Specified by:
finishTerm
in classPushPostingsWriterBase
- Throws:
IOException
-
encodeTerm
public void encodeTerm(DataOutput out, FieldInfo fieldInfo, BlockTermState _state, boolean absolute) throws IOException
- Specified by:
encodeTerm
in classPostingsWriterBase
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classPostingsWriterBase
- Throws:
IOException
-
-