public class SegmentCommitInfo extends Object
Modifier and Type | Field and Description |
---|---|
SegmentInfo |
info
The
SegmentInfo that we wrap. |
Constructor and Description |
---|
SegmentCommitInfo(SegmentInfo info,
int delCount,
long delGen,
long fieldInfosGen,
long docValuesGen)
Sole constructor.
|
Modifier and Type | Method and Description |
---|---|
SegmentCommitInfo |
clone() |
Collection<String> |
files()
Returns all files in use by this segment.
|
int |
getDelCount()
Returns the number of deleted docs in the segment.
|
long |
getDelGen()
Returns generation number of the live docs file
or -1 if there are no deletes yet.
|
long |
getDocValuesGen()
Returns the generation number of the DocValues file or -1 if there are no
doc-values updates yet.
|
Map<Integer,Set<String>> |
getDocValuesUpdatesFiles()
Returns the per-field DocValues updates files.
|
Set<String> |
getFieldInfosFiles()
Returns the FieldInfos file names.
|
long |
getFieldInfosGen()
Returns the generation number of the field infos file or -1 if there are no
field updates yet.
|
long |
getNextDelGen()
Returns the next available generation number
of the live docs file.
|
long |
getNextDocValuesGen()
Returns the next available generation number of the DocValues files.
|
long |
getNextFieldInfosGen()
Returns the next available generation number of the FieldInfos files.
|
boolean |
hasDeletions()
Returns true if there are any deletions for the
segment at this commit.
|
boolean |
hasFieldUpdates()
Returns true if there are any field updates for the segment in this commit.
|
void |
setDocValuesUpdatesFiles(Map<Integer,Set<String>> dvUpdatesFiles)
Sets the DocValues updates file names, per field number.
|
void |
setFieldInfosFiles(Set<String> fieldInfosFiles)
Sets the FieldInfos file names.
|
void |
setGenUpdatesFiles(Map<Long,Set<String>> genUpdatesFiles)
Deprecated.
required to support 4.6-4.8 indexes.
|
long |
sizeInBytes()
Returns total size in bytes of all files for this
segment.
|
String |
toString() |
String |
toString(Directory dir,
int pendingDelCount)
Deprecated.
Use
toString(int) instead. |
String |
toString(int pendingDelCount)
Returns a description of this segment.
|
public final SegmentInfo info
SegmentInfo
that we wrap.public SegmentCommitInfo(SegmentInfo info, int delCount, long delGen, long fieldInfosGen, long docValuesGen)
info
- SegmentInfo
that we wrapdelCount
- number of deleted documents in this segmentdelGen
- deletion generation number (used to name deletion files)fieldInfosGen
- FieldInfos generation number (used to name field-infos files)docValuesGen
- DocValues generation number (used to name doc-values updates files)@Deprecated public void setGenUpdatesFiles(Map<Long,Set<String>> genUpdatesFiles)
public Map<Integer,Set<String>> getDocValuesUpdatesFiles()
public void setDocValuesUpdatesFiles(Map<Integer,Set<String>> dvUpdatesFiles)
public void setFieldInfosFiles(Set<String> fieldInfosFiles)
public long sizeInBytes() throws IOException
IOException
public Collection<String> files() throws IOException
IOException
public boolean hasDeletions()
public boolean hasFieldUpdates()
public long getNextFieldInfosGen()
public long getFieldInfosGen()
public long getNextDocValuesGen()
public long getDocValuesGen()
public long getNextDelGen()
public long getDelGen()
public int getDelCount()
@Deprecated public String toString(Directory dir, int pendingDelCount)
toString(int)
instead.public String toString(int pendingDelCount)
public SegmentCommitInfo clone()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.