
OrdinalMap
- Namespace
- Rowles.LeanCorpus.Search.Scoring
- Assembly
- Rowles.LeanCorpus.dll
Maps sorted local ordinals from several readers into one stable, lexicographically ordered ordinal space.
public sealed class OrdinalMap
- Inheritance
-
OrdinalMap
Remarks
Each source term list must be sorted with Ordinal and must not contain duplicates. The map is immutable after construction, so readers can share it across concurrent aggregation, grouping, and sorted-value operations.
SourceCount
Gets the number of source ordinal spaces represented by this map.
Terms
Gets the global terms in ordinal order.
ValueCount
Gets the number of unique terms in the global ordinal space.
Build(IReadOnlyList<IReadOnlyList<string>>)
Builds a map from one sorted, duplicate-free term list per source reader.
GetGlobalOrdinal(int, int)
Gets the global ordinal for a source-local ordinal.
GetTerm(int)
Gets the term represented by a global ordinal.
TryGetGlobalOrdinal(int, string, out int)
Looks up a global ordinal by term in a source reader.