Module org.apache.lucene.core
Class Lucene90LiveDocsFormat
java.lang.Object
org.apache.lucene.codecs.LiveDocsFormat
org.apache.lucene.codecs.lucene90.Lucene90LiveDocsFormat
Lucene 9.0 live docs format
The .liv file is optional, and only exists when a segment contains deletions.
Although per-segment, this file is maintained exterior to compound segment files.
Deletions (.liv) --> IndexHeader,Generation,Bits
- SegmentHeader -->
IndexHeader
- Bits --> <
Int64
> LongCount
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
files
(SegmentCommitInfo info, Collection<String> files) Records all files in use by thisSegmentCommitInfo
into the files argument.private FixedBitSet
readFixedBitSet
(IndexInput input, int length) readLiveDocs
(Directory dir, SegmentCommitInfo info, IOContext context) Read live docs bits.private int
writeBits
(IndexOutput output, Bits bits) void
writeLiveDocs
(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) Persist live docs bits.
-
Field Details
-
EXTENSION
extension of live docs- See Also:
-
CODEC_NAME
codec of live docs- See Also:
-
VERSION_START
private static final int VERSION_STARTsupported version range- See Also:
-
VERSION_CURRENT
private static final int VERSION_CURRENT- See Also:
-
-
Constructor Details
-
Lucene90LiveDocsFormat
public Lucene90LiveDocsFormat()Sole constructor.
-
-
Method Details
-
readLiveDocs
public Bits readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context) throws IOException Description copied from class:LiveDocsFormat
Read live docs bits.- Specified by:
readLiveDocs
in classLiveDocsFormat
- Throws:
IOException
-
readFixedBitSet
- Throws:
IOException
-
writeLiveDocs
public void writeLiveDocs(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) throws IOException Description copied from class:LiveDocsFormat
Persist live docs bits. UseSegmentCommitInfo.getNextDelGen()
to determine the generation of the deletes file you should write to.- Specified by:
writeLiveDocs
in classLiveDocsFormat
- Throws:
IOException
-
writeBits
- Throws:
IOException
-
files
Description copied from class:LiveDocsFormat
Records all files in use by thisSegmentCommitInfo
into the files argument.- Specified by:
files
in classLiveDocsFormat
- Throws:
IOException
-