Class SegmentInfo
Information about a segment such as it's name, directory, and files related to the segment.
@lucene.experimental
Inheritance
Assembly: DistributedLucene.Net.dll
Syntax
public sealed class SegmentInfo : object
Constructors
Name | Description |
---|---|
SegmentInfo(Directory, String, String, Int32, Boolean, Codec, IDictionary<String, String>) | Construct a new complete SegmentInfo instance from input. Note: this is public only to allow access from the codecs package. |
SegmentInfo(Directory, String, String, Int32, Boolean, Codec, IDictionary<String, String>, IDictionary<String, String>) | Construct a new complete SegmentInfo instance from input. Note: this is public only to allow access from the codecs package. |
Fields
Name | Description |
---|---|
NO | Used by some member fields to mean not present (e.g., norms, deletions). |
YES | Used by some member fields to mean present (e.g., norms, deletions). |
Properties
Name | Description |
---|---|
Attributes | Returns the internal codec attributes map. May be null if no mappings exist. |
Codec | Gets or Sets Codec that wrote this segment. Setter can only be called once. |
Diagnostics | Gets or Sets diagnostics saved into the segment when it was written. |
Dir | Where this segment resides. |
DocCount | Returns number of documents in this segment (deletions are not taken into account). |
Name | Unique segment name in the directory. |
UseCompoundFile | Gets or Sets whether this segment is stored as a compound file.
|
Version | Used by DefaultSegmentInfosReader to upgrade a 3.0 segment to record its version is "3.0". this method can be removed when we're not required to support 3x indexes anymore, e.g. in 5.0. NOTE: this method is used for internal purposes only - you should not modify the version of a SegmentInfo, or it may result in unexpected exceptions thrown when you attempt to open the index. @lucene.internal |
Methods
Name | Description |
---|---|
AddFile(String) | Add this file to the set of files written for this segment. |
AddFiles(ICollection<String>) | Add these files to the set of files written for this segment. |
Equals(Object) | We consider another SegmentInfo instance equal if it has the same dir and same name. |
GetAttribute(String) | Get a codec attribute value, or null if it does not exist |
GetFiles() | Return all files referenced by this SegmentInfo. |
GetHashCode() | |
PutAttribute(String, String) | Puts a codec attribute value. This is a key-value mapping for the field that the codec can use to store additional metadata, and will be available to the codec when reading the segment via GetAttribute(String) If a value already exists for the field, it will be replaced with the new value. |
SetFiles(ISet<String>) | Sets the files written for this segment. |
ToString() | |
ToString(Directory, Int32) | Used for debugging. Format may suddenly change. Current format looks like
|