Class Lucene50LiveDocsFormat
java.lang.Object
org.apache.lucene.codecs.LiveDocsFormat
org.apache.lucene.backward_codecs.lucene50.Lucene50LiveDocsFormat
Lucene 5.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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
files
(SegmentCommitInfo info, Collection<String> files) readLiveDocs
(Directory dir, SegmentCommitInfo info, IOContext context) void
writeLiveDocs
(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) Note: although this format is only used on older versions, we need to keep the write logic in addition to the read logic.
-
Constructor Details
-
Lucene50LiveDocsFormat
public Lucene50LiveDocsFormat()Sole constructor.
-
-
Method Details
-
readLiveDocs
public Bits readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context) throws IOException - Specified by:
readLiveDocs
in classLiveDocsFormat
- Throws:
IOException
-
writeLiveDocs
public void writeLiveDocs(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) throws IOException Note: although this format is only used on older versions, we need to keep the write logic in addition to the read logic. When we delete documents that live in an older segment, we write to the live docs for that segment.- Specified by:
writeLiveDocs
in classLiveDocsFormat
- Throws:
IOException
-
files
- Specified by:
files
in classLiveDocsFormat
- Throws:
IOException
-