Class SegmentCommitInfo
Embeds a [read-only] SegmentInfo and adds per-commit fields.
Note
This API is experimental and might change in incompatible ways in the next release.
Inheritance
Inherited Members
Namespace: Lucene.Net.Index
Assembly: Lucene.Net.dll
Syntax
public class SegmentCommitInfo
Constructors
| Improve this Doc View SourceSegmentCommitInfo(SegmentInfo, Int32, Int64, Int64)
Sole constructor.
Declaration
public SegmentCommitInfo(SegmentInfo info, int delCount, long delGen, long fieldInfosGen)
Parameters
Type | Name | Description |
---|---|---|
SegmentInfo | info | SegmentInfo that we wrap |
System.Int32 | delCount | number of deleted documents in this segment |
System.Int64 | delGen | deletion generation number (used to name deletion files) |
System.Int64 | fieldInfosGen | FieldInfos generation number (used to name field-infos files) |
Properties
| Improve this Doc View SourceDelCount
Returns the number of deleted docs in the segment.
Declaration
public virtual int DelCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
DelGen
Returns generation number of the live docs file or -1 if there are no deletes yet.
Declaration
public virtual long DelGen { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
FieldInfosGen
Returns the generation number of the field infos file or -1 if there are no field updates yet.
Declaration
public virtual long FieldInfosGen { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
HasDeletions
Returns true
if there are any deletions for the
segment at this commit.
Declaration
public virtual bool HasDeletions { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasFieldUpdates
Returns true
if there are any field updates for the segment in this commit.
Declaration
public virtual bool HasFieldUpdates { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Info
The SegmentInfo that we wrap.
Declaration
public SegmentInfo Info { get; }
Property Value
Type | Description |
---|---|
SegmentInfo |
NextDelGen
Returns the next available generation number of the live docs file.
Declaration
public virtual long NextDelGen { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
NextFieldInfosGen
Returns the next available generation number of the FieldInfos files.
Declaration
public virtual long NextFieldInfosGen { get; }
Property Value
Type | Description |
---|---|
System.Int64 |
UpdatesFiles
Returns the per generation updates files.
Declaration
public virtual IDictionary<long, ISet<string>> UpdatesFiles { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.Int64, System.Collections.Generic.ISet<System.String>> |
Methods
| Improve this Doc View SourceClone()
Declaration
public virtual object Clone()
Returns
Type | Description |
---|---|
System.Object |
GetFiles()
Returns all files in use by this segment.
Declaration
public virtual ICollection<string> GetFiles()
Returns
Type | Description |
---|---|
System.Collections.Generic.ICollection<System.String> |
GetSizeInBytes()
Returns total size in bytes of all files for this segment.
NOTE: this value is not correct for 3.0 segments that have shared docstores. To get the correct value, upgrade!
Declaration
public virtual long GetSizeInBytes()
Returns
Type | Description |
---|---|
System.Int64 |
SetGenUpdatesFiles(IDictionary<Int64, ISet<String>>)
Sets the updates file names per generation. Does not deep clone the map.
Declaration
public virtual void SetGenUpdatesFiles(IDictionary<long, ISet<string>> genUpdatesFiles)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IDictionary<System.Int64, System.Collections.Generic.ISet<System.String>> | genUpdatesFiles |
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |
Overrides
ToString(Directory, Int32)
Returns a description of this segment.
Declaration
public virtual string ToString(Directory dir, int pendingDelCount)
Parameters
Type | Name | Description |
---|---|---|
Directory | dir | |
System.Int32 | pendingDelCount |
Returns
Type | Description |
---|---|
System.String |