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