Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class RangeFacetCounts

    Base class for range faceting.

    Note

    This API is experimental and might change in incompatible ways in the next release.

    Inheritance
    object
    Facets
    RangeFacetCounts
    DoubleRangeFacetCounts
    Int64RangeFacetCounts
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Facet.Range
    Assembly: Lucene.Net.Facet.dll
    Syntax
    public abstract class RangeFacetCounts : Facets

    Constructors

    RangeFacetCounts(string, Range[], Filter)

    Create RangeFacetCounts

    Declaration
    protected RangeFacetCounts(string field, Range[] ranges, Filter fastMatchFilter)
    Parameters
    Type Name Description
    string field
    Range[] ranges
    Filter fastMatchFilter

    Fields

    m_counts

    Counts, initialized in by subclass.

    Declaration
    protected readonly int[] m_counts
    Field Value
    Type Description
    int[]

    m_fastMatchFilter

    Optional: if specified, we first test this Filter to see whether the document should be checked for matching ranges. If this is null, all documents are checked.

    Declaration
    protected readonly Filter m_fastMatchFilter
    Field Value
    Type Description
    Filter

    m_field

    Our field name.

    Declaration
    protected readonly string m_field
    Field Value
    Type Description
    string

    m_ranges

    Ranges passed to constructor.

    Declaration
    protected readonly Range[] m_ranges
    Field Value
    Type Description
    Range[]

    m_totCount

    Total number of hits.

    Declaration
    protected int m_totCount
    Field Value
    Type Description
    int

    Methods

    GetAllDims(int)

    Returns topN labels for any dimension that had hits, sorted by the number of hits that dimension matched; this is used for "sparse" faceting, where many different dimensions were indexed, for example depending on the type of document.

    Declaration
    public override IList<FacetResult> GetAllDims(int topN)
    Parameters
    Type Name Description
    int topN
    Returns
    Type Description
    IList<FacetResult>
    Overrides
    Facets.GetAllDims(int)

    GetSpecificValue(string, params string[])

    Return the count or value for a specific path. Returns -1 if this path doesn't exist, else the count.

    Declaration
    public override float GetSpecificValue(string dim, params string[] path)
    Parameters
    Type Name Description
    string dim
    string[] path
    Returns
    Type Description
    float
    Overrides
    Facets.GetSpecificValue(string, params string[])

    GetTopChildren(int, string, params string[])

    Returns the topN child labels under the specified path. Returns null if the specified path doesn't exist or if this dimension was never seen.

    Declaration
    public override FacetResult GetTopChildren(int topN, string dim, params string[] path)
    Parameters
    Type Name Description
    int topN
    string dim
    string[] path
    Returns
    Type Description
    FacetResult
    Overrides
    Facets.GetTopChildren(int, string, params string[])
    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.