
SegmentInfo
- Namespace
- Rowles.LeanCorpus.Index.Segment
- Assembly
- Rowles.LeanCorpus.dll
Metadata record for a single immutable segment.
public sealed class SegmentInfo
CommitGeneration
Gets the commit generation at which this segment was created.
DelGeneration
The commit generation at which the current live-document file was written.
When set, the file is named {SegmentId}gen{DelGeneration}.del.
When null, the legacy {SegmentId}.del path is used for backward compatibility.
DocCount
Gets the total number of documents in this segment, including deleted documents.
FieldNames
Gets the names of all indexed fields present in this segment.
IndexSortFields
Serialised index sort fields for this segment. Null if the segment is unsorted. Each entry is "Type:FieldName:Descending" (e.g. "Numeric:price:True").
LiveDocCount
Gets the number of live (non-deleted) documents in this segment.
SegmentId
Gets the unique identifier for this segment (e.g. "seg_0").
VectorFields
Per-field vector metadata for vectors stored in this segment.
ReadFrom(string)
Reads and deserialises segment metadata from the specified JSON file.
WriteTo(string)
Writes this segment metadata to a JSON file at the specified path.