Class Lucene50LiveDocsFormat
- java.lang.Object
-
- org.apache.lucene.codecs.LiveDocsFormat
-
- org.apache.lucene.backward_codecs.lucene50.Lucene50LiveDocsFormat
-
public final class Lucene50LiveDocsFormat extends LiveDocsFormat
Lucene 5.0 live docs formatThe .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
- SegmentHeader -->
-
-
Constructor Summary
Constructors Constructor Description Lucene50LiveDocsFormat()
Sole constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
files(SegmentCommitInfo info, Collection<String> files)
Bits
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.
-
-
-
Method Detail
-
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
public void files(SegmentCommitInfo info, Collection<String> files) throws IOException
- Specified by:
files
in classLiveDocsFormat
- Throws:
IOException
-
-