Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class NumericRangeQuery

    LUCENENET specific class to provide access to static factory metods of NumericRangeQuery<T> without referring to its genereic closing type.

    Inheritance
    System.Object
    NumericRangeQuery
    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.Search
    Assembly: Lucene.Net.dll
    Syntax
    public static class NumericRangeQuery

    Methods

    | Improve this Doc View Source

    NewDoubleRange(String, Int32, Nullable<Double>, Nullable<Double>, Boolean, Boolean)

    Factory that creates a NumericRangeQuery<T>, that queries a System.Double range using the given Lucene.Net.Search.NumericRangeQuery`1.precisionStep. You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. System.Double.NaN will never match a half-open range, to hit NaN use a query with min == max == System.Double.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

    Declaration
    public static NumericRangeQuery<double> NewDoubleRange(string field, int precisionStep, double? min, double? max, bool minInclusive, bool maxInclusive)
    Parameters
    Type Name Description
    System.String field
    System.Int32 precisionStep
    System.Nullable<System.Double> min
    System.Nullable<System.Double> max
    System.Boolean minInclusive
    System.Boolean maxInclusive
    Returns
    Type Description
    NumericRangeQuery<System.Double>
    | Improve this Doc View Source

    NewDoubleRange(String, Nullable<Double>, Nullable<Double>, Boolean, Boolean)

    Factory that creates a NumericRangeQuery<T>, that queries a System.Double range using the default Lucene.Net.Search.NumericRangeQuery`1.precisionStep PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. System.Double.NaN will never match a half-open range, to hit NaN use a query with min == max == System.Double.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

    Declaration
    public static NumericRangeQuery<double> NewDoubleRange(string field, double? min, double? max, bool minInclusive, bool maxInclusive)
    Parameters
    Type Name Description
    System.String field
    System.Nullable<System.Double> min
    System.Nullable<System.Double> max
    System.Boolean minInclusive
    System.Boolean maxInclusive
    Returns
    Type Description
    NumericRangeQuery<System.Double>
    | Improve this Doc View Source

    NewInt32Range(String, Int32, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean)

    Factory that creates a NumericRangeQuery<T>, that queries a System.Int32 range using the given Lucene.Net.Search.NumericRangeQuery`1.precisionStep. You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

    NOTE: This was newIntRange() in Lucene

    Declaration
    public static NumericRangeQuery<int> NewInt32Range(string field, int precisionStep, int? min, int? max, bool minInclusive, bool maxInclusive)
    Parameters
    Type Name Description
    System.String field
    System.Int32 precisionStep
    System.Nullable<System.Int32> min
    System.Nullable<System.Int32> max
    System.Boolean minInclusive
    System.Boolean maxInclusive
    Returns
    Type Description
    NumericRangeQuery<System.Int32>
    | Improve this Doc View Source

    NewInt32Range(String, Nullable<Int32>, Nullable<Int32>, Boolean, Boolean)

    Factory that creates a NumericRangeQuery<T>, that queries a System.Int32 range using the default Lucene.Net.Search.NumericRangeQuery`1.precisionStep PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

    NOTE: This was newIntRange() in Lucene

    Declaration
    public static NumericRangeQuery<int> NewInt32Range(string field, int? min, int? max, bool minInclusive, bool maxInclusive)
    Parameters
    Type Name Description
    System.String field
    System.Nullable<System.Int32> min
    System.Nullable<System.Int32> max
    System.Boolean minInclusive
    System.Boolean maxInclusive
    Returns
    Type Description
    NumericRangeQuery<System.Int32>
    | Improve this Doc View Source

    NewInt64Range(String, Int32, Nullable<Int64>, Nullable<Int64>, Boolean, Boolean)

    Factory that creates a NumericRangeQuery<T>, that queries a System.Int64 range using the given Lucene.Net.Search.NumericRangeQuery`1.precisionStep. You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

    NOTE: This was newLongRange() in Lucene

    Declaration
    public static NumericRangeQuery<long> NewInt64Range(string field, int precisionStep, long? min, long? max, bool minInclusive, bool maxInclusive)
    Parameters
    Type Name Description
    System.String field
    System.Int32 precisionStep
    System.Nullable<System.Int64> min
    System.Nullable<System.Int64> max
    System.Boolean minInclusive
    System.Boolean maxInclusive
    Returns
    Type Description
    NumericRangeQuery<System.Int64>
    | Improve this Doc View Source

    NewInt64Range(String, Nullable<Int64>, Nullable<Int64>, Boolean, Boolean)

    Factory that creates a NumericRangeQuery<T>, that queries a System.Int64 range using the default Lucene.Net.Search.NumericRangeQuery`1.precisionStep PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

    NOTE: This was newLongRange() in Lucene

    Declaration
    public static NumericRangeQuery<long> NewInt64Range(string field, long? min, long? max, bool minInclusive, bool maxInclusive)
    Parameters
    Type Name Description
    System.String field
    System.Nullable<System.Int64> min
    System.Nullable<System.Int64> max
    System.Boolean minInclusive
    System.Boolean maxInclusive
    Returns
    Type Description
    NumericRangeQuery<System.Int64>
    | Improve this Doc View Source

    NewSingleRange(String, Int32, Nullable<Single>, Nullable<Single>, Boolean, Boolean)

    Factory that creates a NumericRangeQuery<T>, that queries a System.Single range using the given Lucene.Net.Search.NumericRangeQuery`1.precisionStep. You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. System.Single.NaN will never match a half-open range, to hit NaN use a query with min == max == System.Single.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

    NOTE: This was newFloatRange() in Lucene

    Declaration
    public static NumericRangeQuery<float> NewSingleRange(string field, int precisionStep, float? min, float? max, bool minInclusive, bool maxInclusive)
    Parameters
    Type Name Description
    System.String field
    System.Int32 precisionStep
    System.Nullable<System.Single> min
    System.Nullable<System.Single> max
    System.Boolean minInclusive
    System.Boolean maxInclusive
    Returns
    Type Description
    NumericRangeQuery<System.Single>
    | Improve this Doc View Source

    NewSingleRange(String, Nullable<Single>, Nullable<Single>, Boolean, Boolean)

    Factory that creates a NumericRangeQuery<T>, that queries a System.Single range using the default Lucene.Net.Search.NumericRangeQuery`1.precisionStep PRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. System.Single.NaN will never match a half-open range, to hit NaN use a query with min == max == System.Single.NaN. By setting inclusive to false, it will match all documents excluding the bounds, with inclusive on, the boundaries are hits, too.

    NOTE: This was newFloatRange() in Lucene

    Declaration
    public static NumericRangeQuery<float> NewSingleRange(string field, float? min, float? max, bool minInclusive, bool maxInclusive)
    Parameters
    Type Name Description
    System.String field
    System.Nullable<System.Single> min
    System.Nullable<System.Single> max
    System.Boolean minInclusive
    System.Boolean maxInclusive
    Returns
    Type Description
    NumericRangeQuery<System.Single>
    • 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.