org.apache.lucene.facet.range

## Class DoubleRange

- java.lang.Object
- - org.apache.lucene.facet.range.Range
  - - org.apache.lucene.facet.range.DoubleRange

-     public final class DoubleRange
      extends Range

  Represents a range over double values.
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `double` | `max` Maximum.
    `boolean` | `maxInclusive` True if the maximum value is inclusive.
    `double` | `min` Minimum.
    `boolean` | `minInclusive` True if the minimum value is inclusive.

    - ### Fields inherited from class org.apache.lucene.facet.range.Range

      `label`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DoubleRange(String label, double minIn, boolean minInclusive, double maxIn, boolean maxInclusive)` Create a DoubleRange.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(double value)` True if this range accepts the provided value.
    `Query` | `getQuery(Query fastMatchQuery, ValueSource valueSource)` Returns a new `Query` accepting only documents in this range.
    `String` | `toString()`

    - ### Methods inherited from class org.apache.lucene.facet.range.Range

      `failNoMatch, getQuery`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### min

          public final double min

      Minimum.

    - #### max

          public final double max

      Maximum.

    - #### minInclusive

          public final boolean minInclusive

      True if the minimum value is inclusive.

    - #### maxInclusive

          public final boolean maxInclusive

      True if the maximum value is inclusive.

  - ### Constructor Detail

    - #### DoubleRange

          public DoubleRange(String label,
                     double minIn,
                     boolean minInclusive,
                     double maxIn,
                     boolean maxInclusive)

      Create a DoubleRange.

  - ### Method Detail

    - #### accept

          public boolean accept(double value)

      True if this range accepts the provided value.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### getQuery

          public Query getQuery(Query fastMatchQuery,
                       ValueSource valueSource)

      Description copied from class: `Range`
      Returns a new `Query` accepting only documents in this range. This query might not be very efficient when run on its own since it is optimized towards random-access, so it is best used either with `DrillDownQuery` or when intersected with another query that can lead the iteration. If the `ValueSource` is static, e.g. an indexed numeric field, then it may be more efficient to use `NumericRangeQuery`. The provided fastMatchQuery, if non-null, will first be consulted, and only if that is set for each document will the range then be checked.
      Specified by:
        `getQuery` in class `Range`

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.