Show / Hide Table of Contents

    Class LabelToOrdinal

    Abstract class for storing Label->Ordinal mappings in a taxonomy.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Inheritance
    System.Object
    LabelToOrdinal
    CompactLabelToOrdinal
    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 Source

    LabelToOrdinal()

    Default constructor.

    Declaration
    public LabelToOrdinal()

    Fields

    | Improve this Doc View Source

    INVALID_ORDINAL

    Returned by GetOrdinal(FacetLabel) when the label isn't recognized.

    Declaration
    public const int INVALID_ORDINAL = -2
    Field Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    m_counter

    How many ordinals we've seen.

    Declaration
    protected int m_counter
    Field Value
    Type Description
    System.Int32

    Properties

    | Improve this Doc View Source

    MaxOrdinal

    return the maximal Ordinal assigned so far

    Declaration
    public virtual int MaxOrdinal { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    | Improve this Doc View Source

    AddLabel(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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)