Namespace Lucene.Net.Facet.SortedSet
Provides faceting capabilities over facets that were indexed with SortedSetDocValuesFacetField.
Classes
DefaultSortedSetDocValuesReaderState
Default implementation of SortedSetDocValuesFacetCounts
SortedSetDocValuesFacetCounts
Compute facets counts from previously indexed SortedSetDocValuesFacetField, without require a separate taxonomy index. Faceting is a bit slower (~25%), and there is added cost on every Lucene.Net.Index.IndexReader open to create a new SortedSetDocValuesReaderState. Furthermore, this does not support hierarchical facets; only flat (dimension + label) facets, but it uses quite a bit less RAM to do so.
NOTE: this class should be instantiated and then used from a single thread, because it holds a thread-private instance of Lucene.Net.Index.SortedSetDocValues.
NOTE:: tie-break is by unicode sort order @lucene.experimental
SortedSetDocValuesFacetField
Add an instance of this to your Lucene.Net.Documents.Document for every facet label to be indexed via Lucene.Net.Index.SortedSetDocValues.
SortedSetDocValuesReaderState
Wraps a Lucene.Net.Index.IndexReader and resolves ords using existing Lucene.Net.Index.SortedSetDocValues APIs without a separate taxonomy index. This only supports flat facets (dimension + label), and it makes faceting a bit slower, adds some cost at reopen time, but avoids managing the separate taxonomy index. It also requires less RAM than the taxonomy index, as it manages the flat (2-level) hierarchy more efficiently. In addition, the tie-break during faceting is now meaningful (in label sorted order).
NOTE: creating an instance of this class is somewhat costly, as it computes per-segment ordinal maps, so you should create it once and re-use that one instance for a given Lucene.Net.Index.IndexReader.
SortedSetDocValuesReaderState.OrdRange
Holds start/end range of ords, which maps to one dimension (someday we may generalize it to map to hierarchies within one dimension).