Class LabelToOrdinal
Abstract class for storing Label->Ordinal mappings in a taxonomy.
This is a Lucene.NET EXPERIMENTAL API, use at your own risk
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Lucene.Net.Facet.Taxonomy.WriterCache
Assembly: Lucene.Net.Facet.dll
Syntax
public abstract class LabelToOrdinal
Constructors
| Improve this Doc View SourceLabelToOrdinal()
Default constructor.
Declaration
public LabelToOrdinal()
Fields
| Improve this Doc View SourceINVALID_ORDINAL
Returned by GetOrdinal(FacetLabel) when the label isn't recognized.
Declaration
public const int INVALID_ORDINAL = -2
Field Value
Type | Description |
---|---|
System.Int32 |
m_counter
How many ordinals we've seen.
Declaration
protected int m_counter
Field Value
Type | Description |
---|---|
System.Int32 |
Properties
| Improve this Doc View SourceMaxOrdinal
return the maximal Ordinal assigned so far
Declaration
public virtual int MaxOrdinal { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
| Improve this Doc View SourceAddLabel(FacetLabel, Int32)
Adds a new label if its not yet in the table. Throws an System.ArgumentException if the same label with a different ordinal was previoulsy added to this table.
Declaration
public abstract void AddLabel(FacetLabel label, int ordinal)
Parameters
Type | Name | Description |
---|---|---|
FacetLabel | label | |
System.Int32 | ordinal |
GetNextOrdinal()
Returns the next unassigned ordinal. The default behavior of this method is to simply increment a counter.
Declaration
public virtual int GetNextOrdinal()
Returns
Type | Description |
---|---|
System.Int32 |
GetOrdinal(FacetLabel)
Returns the ordinal assigned to the given label, or INVALID_ORDINAL if the label cannot be found in this table.
Declaration
public abstract int GetOrdinal(FacetLabel label)
Parameters
Type | Name | Description |
---|---|---|
FacetLabel | label |
Returns
Type | Description |
---|---|
System.Int32 |