Numeric Range Query

    +

    A numeric range query finds documents containing a numeric value in the specified field within the specified range.

    Define the endpoints using the fields min and max. You can omit any one endpoint, but not both.

    The inclusive_min and inclusive_max properties control whether or not the endpoints are included or excluded.

    By default, min is inclusive and max is exclusive.

    A demonstration of the numeric range Query using the Java SDK can be found in Searching from the SDK.

    Example

    {
     "min": 100, "max": 1000,
     "inclusive_min": false,
     "inclusive_max": false,
     "field": "id"
    }

    Numeric Ranges

    You can specify numeric ranges with the >, >=, <, and <= operators, each followed by a numeric value.

    Example

    `reviews.ratings.Cleanliness:>4`

    The above qeury performs numeric range query on the reviews.ratings.Cleanliness field, for values greater than 4.