Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class NumericRangeFilter<T>

    A Filter that only accepts numeric values within a specified range. To use this, you must first index the numeric values using Int32Field, SingleField, Int64Field or DoubleField (expert: NumericTokenStream).

    You create a new NumericRangeFilter with the static factory methods, eg:

    Filter f = NumericRangeFilter.NewFloatRange("weight", 0.03f, 0.10f, true, true);

    Accepts all documents whose float valued "weight" field ranges from 0.03 to 0.10, inclusive. See NumericRangeQuery for details on how Lucene indexes and searches numeric valued fields.

    @since 2.9

    Inheritance
    System.Object
    Filter
    MultiTermQueryWrapperFilter<NumericRangeQuery<T>>
    NumericRangeFilter<T>
    Inherited Members
    MultiTermQueryWrapperFilter<NumericRangeQuery<T>>.m_query
    MultiTermQueryWrapperFilter<NumericRangeQuery<T>>.ToString()
    MultiTermQueryWrapperFilter<NumericRangeQuery<T>>.Equals(Object)
    MultiTermQueryWrapperFilter<NumericRangeQuery<T>>.GetHashCode()
    MultiTermQueryWrapperFilter<NumericRangeQuery<T>>.Field
    MultiTermQueryWrapperFilter<NumericRangeQuery<T>>.GetDocIdSet(AtomicReaderContext, IBits)
    Filter.NewAnonymous(Func<AtomicReaderContext, IBits, DocIdSet>)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public sealed class NumericRangeFilter<T> : MultiTermQueryWrapperFilter<NumericRangeQuery<T>> where T : struct, IComparable<T>
    Type Parameters
    Name Description
    T

    Properties

    | Improve this Doc View Source

    IncludesMax

    Returns true if the upper endpoint is inclusive

    Declaration
    public bool IncludesMax { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    IncludesMin

    Returns true if the lower endpoint is inclusive

    Declaration
    public bool IncludesMin { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Max

    Returns the upper value of this range filter

    Declaration
    public T? Max { get; }
    Property Value
    Type Description
    System.Nullable<T>
    | Improve this Doc View Source

    Min

    Returns the lower value of this range filter

    Declaration
    public T? Min { get; }
    Property Value
    Type Description
    System.Nullable<T>
    | Improve this Doc View Source

    PrecisionStep

    Returns the precision step.

    Declaration
    public int PrecisionStep { get; }
    Property Value
    Type Description
    System.Int32
    • Improve this Doc
    • View Source
    Back to top Copyright © 2021 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.