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
    object
    NumericRangeQuery
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Search
    Assembly: Lucene.Net.dll
    Syntax
    public static class NumericRangeQuery

    Methods

    NewDoubleRange(string, int, double?, double?, bool, bool)

    Factory that creates a NumericRangeQuery<T>, that queries a double range using the given precisionStep. You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. 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
    string field
    int precisionStep
    double? min
    double? max
    bool minInclusive
    bool maxInclusive
    Returns
    Type Description
    NumericRangeQuery<double>

    NewDoubleRange(string, double?, double?, bool, bool)

    Factory that creates a NumericRangeQuery<T>, that queries a double range using the default precisionStepPRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. 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
    string field
    double? min
    double? max
    bool minInclusive
    bool maxInclusive
    Returns
    Type Description
    NumericRangeQuery<double>

    NewInt32Range(string, int, int?, int?, bool, bool)

    Factory that creates a NumericRangeQuery<T>, that queries a int range using the given 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
    string field
    int precisionStep
    int? min
    int? max
    bool minInclusive
    bool maxInclusive
    Returns
    Type Description
    NumericRangeQuery<int>

    NewInt32Range(string, int?, int?, bool, bool)

    Factory that creates a NumericRangeQuery<T>, that queries a int range using the default precisionStepPRECISION_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
    string field
    int? min
    int? max
    bool minInclusive
    bool maxInclusive
    Returns
    Type Description
    NumericRangeQuery<int>

    NewInt64Range(string, int, long?, long?, bool, bool)

    Factory that creates a NumericRangeQuery<T>, that queries a long range using the given 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
    string field
    int precisionStep
    long? min
    long? max
    bool minInclusive
    bool maxInclusive
    Returns
    Type Description
    NumericRangeQuery<long>

    NewInt64Range(string, long?, long?, bool, bool)

    Factory that creates a NumericRangeQuery<T>, that queries a long range using the default precisionStepPRECISION_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
    string field
    long? min
    long? max
    bool minInclusive
    bool maxInclusive
    Returns
    Type Description
    NumericRangeQuery<long>

    NewSingleRange(string, int, float?, float?, bool, bool)

    Factory that creates a NumericRangeQuery<T>, that queries a float range using the given precisionStep. You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. 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
    string field
    int precisionStep
    float? min
    float? max
    bool minInclusive
    bool maxInclusive
    Returns
    Type Description
    NumericRangeQuery<float>

    NewSingleRange(string, float?, float?, bool, bool)

    Factory that creates a NumericRangeQuery<T>, that queries a float range using the default precisionStepPRECISION_STEP_DEFAULT (4). You can have half-open ranges (which are in fact </<= or >/>= queries) by setting the min or max value to null. 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
    string field
    float? min
    float? max
    bool minInclusive
    bool maxInclusive
    Returns
    Type Description
    NumericRangeQuery<float>
    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.