Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Range

    Base class for a single labeled range.

    Note

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

    Inheritance
    object
    Range
    DoubleRange
    Int64Range
    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 Range

    Constructors

    Range(string)

    Sole constructor.

    Declaration
    protected Range(string label)
    Parameters
    Type Name Description
    string label

    Properties

    Label

    Label that identifies this range.

    Declaration
    public string Label { get; }
    Property Value
    Type Description
    string

    Methods

    FailNoMatch()

    Invoke this for a useless range.

    Declaration
    protected virtual void FailNoMatch()

    GetFilter(ValueSource)

    Returns a new Lucene.Net.Search.Filter accepting only documents in this range. This filter is not general-purpose; you should either use it with DrillSideways by adding it to Add(string, Filter), or pass it to Lucene.Net.Search.FilteredQuery using its Lucene.Net.Search.FilteredQuery.QUERY_FIRST_FILTER_STRATEGY. If the Lucene.Net.Queries.Function.ValueSource is static, e.g. an indexed numeric field, then it may be more efficient to use Lucene.Net.Search.NumericRangeFilter.

    Declaration
    public virtual Filter GetFilter(ValueSource valueSource)
    Parameters
    Type Name Description
    ValueSource valueSource
    Returns
    Type Description
    Filter

    GetFilter(Filter, ValueSource)

    Returns a new Lucene.Net.Search.Filter accepting only documents in this range. This filter is not general-purpose; you should either use it with DrillSideways by adding it to Add(string, Filter), or pass it to Lucene.Net.Search.FilteredQuery using its Lucene.Net.Search.FilteredQuery.QUERY_FIRST_FILTER_STRATEGY. If the Lucene.Net.Queries.Function.ValueSource is static, e.g. an indexed numeric field, then it may be more efficient to use Lucene.Net.Search.NumericRangeFilter. The provided fastMatchFilter, if non-null, will first be consulted, and only if that is set for each document will the range then be checked.

    Declaration
    public abstract Filter GetFilter(Filter fastMatchFilter, ValueSource valueSource)
    Parameters
    Type Name Description
    Filter fastMatchFilter
    ValueSource valueSource
    Returns
    Type Description
    Filter
    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.