Class LabelToOrdinal
Abstract class for storing Label->Ordinal mappings in a taxonomy.
@lucene.experimental
Inheritance
System.Object
LabelToOrdinal
Assembly: DistributedLucene.Net.Facet.dll
Syntax
public abstract class LabelToOrdinal : object
Constructors
Name | Description |
---|---|
LabelToOrdinal() | Default constructor. |
Fields
Name | Description |
---|---|
INVALID_ORDINAL | Returned by GetOrdinal(FacetLabel) when the label isn't recognized. |
m_counter | How many ordinals we've seen. |
Properties
Name | Description |
---|---|
MaxOrdinal | return the maximal Ordinal assigned so far |
Methods
Name | Description |
---|---|
AddLabel(FacetLabel, Int32) | Adds a new label if its not yet in the table.
Throws an |
GetNextOrdinal() | Returns the next unassigned ordinal. The default behavior of this method is to simply increment a counter. |
GetOrdinal(FacetLabel) | Returns the ordinal assigned to the given label, or INVALID_ORDINAL if the label cannot be found in this table. |