public final class Lucene50LiveDocsFormat extends LiveDocsFormat
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
IndexHeaderInt64> LongCount| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
CODEC_NAME
codec of live docs
|
private static java.lang.String |
EXTENSION
extension of live docs
|
private static int |
VERSION_CURRENT |
private static int |
VERSION_START
supported version range
|
| Constructor and Description |
|---|
Lucene50LiveDocsFormat()
Sole constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
files(SegmentCommitInfo info,
java.util.Collection<java.lang.String> files)
Records all files in use by this
SegmentCommitInfo into the files argument. |
Bits |
readLiveDocs(Directory dir,
SegmentCommitInfo info,
IOContext context)
Read live docs bits.
|
void |
writeLiveDocs(Bits bits,
Directory dir,
SegmentCommitInfo info,
int newDelCount,
IOContext context)
Persist live docs bits.
|
private static final java.lang.String EXTENSION
private static final java.lang.String CODEC_NAME
private static final int VERSION_START
private static final int VERSION_CURRENT
public Bits readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context) throws java.io.IOException
LiveDocsFormatreadLiveDocs in class LiveDocsFormatjava.io.IOExceptionpublic void writeLiveDocs(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context) throws java.io.IOException
LiveDocsFormatSegmentCommitInfo.getNextDelGen() to determine the
generation of the deletes file you should write to.writeLiveDocs in class LiveDocsFormatjava.io.IOExceptionpublic void files(SegmentCommitInfo info, java.util.Collection<java.lang.String> files) throws java.io.IOException
LiveDocsFormatSegmentCommitInfo into the files argument.files in class LiveDocsFormatjava.io.IOException