Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class FacetLabel

    Holds a sequence of string components, specifying the hierarchical name of a category.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Inheritance
    object
    FacetLabel
    Implements
    IComparable<FacetLabel>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Lucene.Net.Facet.Taxonomy
    Assembly: Lucene.Net.Facet.dll
    Syntax
    public class FacetLabel : IComparable<FacetLabel>

    Constructors

    FacetLabel(string, string[])

    Construct from the dimension plus the given path components.

    Declaration
    public FacetLabel(string dim, string[] path)
    Parameters
    Type Name Description
    string dim
    string[] path

    FacetLabel(params string[])

    Construct from the given path components.

    Declaration
    public FacetLabel(params string[] components)
    Parameters
    Type Name Description
    string[] components

    Fields

    MAX_CATEGORY_PATH_LENGTH

    The maximum number of characters a FacetLabel can have.

    Declaration
    public static readonly int MAX_CATEGORY_PATH_LENGTH
    Field Value
    Type Description
    int

    Properties

    Components

    The components of this FacetLabel. Note that this array may be shared with other FacetLabel instances, e.g. as a result of Subpath(int), therefore you should traverse the array up to Length for this path's components.

    Declaration
    public string[] Components { get; }
    Property Value
    Type Description
    string[]

    Length

    The number of components of this FacetLabel.

    Declaration
    public int Length { get; }
    Property Value
    Type Description
    int

    Methods

    CompareTo(FacetLabel)

    Compares this path with another FacetLabel for lexicographic order.

    Declaration
    public virtual int CompareTo(FacetLabel other)
    Parameters
    Type Name Description
    FacetLabel other
    Returns
    Type Description
    int

    Equals(object)

    Determines whether the specified object is equal to the current object.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj

    The object to compare with the current object.

    Returns
    Type Description
    bool

    true if the specified object is equal to the current object; otherwise, false.

    Overrides
    object.Equals(object)

    GetHashCode()

    Serves as the default hash function.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    A hash code for the current object.

    Overrides
    object.GetHashCode()

    Int64HashCode()

    Calculate a 64-bit hash function for this path. This is necessary for NameHashInt32CacheLru (the default cache impl for LruTaxonomyWriterCache) to reduce the chance of "silent but deadly" collisions.

    NOTE: This was longHashCode() in Lucene
    Declaration
    public virtual long Int64HashCode()
    Returns
    Type Description
    long

    Subpath(int)

    Returns a sub-path of this path up to length components.

    Declaration
    public virtual FacetLabel Subpath(int length)
    Parameters
    Type Name Description
    int length
    Returns
    Type Description
    FacetLabel

    ToString()

    Returns a string representation of the path.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Operators

    operator ==(FacetLabel, FacetLabel)

    Holds a sequence of string components, specifying the hierarchical name of a category.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static bool operator ==(FacetLabel left, FacetLabel right)
    Parameters
    Type Name Description
    FacetLabel left
    FacetLabel right
    Returns
    Type Description
    bool

    operator >(FacetLabel, FacetLabel)

    Holds a sequence of string components, specifying the hierarchical name of a category.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static bool operator >(FacetLabel left, FacetLabel right)
    Parameters
    Type Name Description
    FacetLabel left
    FacetLabel right
    Returns
    Type Description
    bool

    operator >=(FacetLabel, FacetLabel)

    Holds a sequence of string components, specifying the hierarchical name of a category.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static bool operator >=(FacetLabel left, FacetLabel right)
    Parameters
    Type Name Description
    FacetLabel left
    FacetLabel right
    Returns
    Type Description
    bool

    operator !=(FacetLabel, FacetLabel)

    Holds a sequence of string components, specifying the hierarchical name of a category.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static bool operator !=(FacetLabel left, FacetLabel right)
    Parameters
    Type Name Description
    FacetLabel left
    FacetLabel right
    Returns
    Type Description
    bool

    operator <(FacetLabel, FacetLabel)

    Holds a sequence of string components, specifying the hierarchical name of a category.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static bool operator <(FacetLabel left, FacetLabel right)
    Parameters
    Type Name Description
    FacetLabel left
    FacetLabel right
    Returns
    Type Description
    bool

    operator <=(FacetLabel, FacetLabel)

    Holds a sequence of string components, specifying the hierarchical name of a category.

    Note

    This API is for internal purposes only and might change in incompatible ways in the next release.

    Declaration
    public static bool operator <=(FacetLabel left, FacetLabel right)
    Parameters
    Type Name Description
    FacetLabel left
    FacetLabel right
    Returns
    Type Description
    bool

    Implements

    IComparable<T>
    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.