org.apache.lucene.facet.range

## Class LongRange

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

-     public final class LongRange
      extends Range

  Represents a range over long 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
    --- | ---
    `long` | `max` Maximum (inclusive).
    `long` | `min` Minimum (inclusive).

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

      `label`

  - ### Constructor Summary

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(long value)` True if this range accepts the provided value.
    `boolean` | `equals(Object _that)`
    `Query` | `getQuery(Query fastMatchQuery, LongValuesSource valueSource)` Create a Query that matches documents in this range The query will check all documents that match the provided match query, or every document in the index if the match query is null.
    `int` | `hashCode()`
    `String` | `toString()`

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

      `failNoMatch`

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

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

- - ### Field Detail

    - #### min

          public final long min

      Minimum (inclusive).

    - #### max

          public final long max

      Maximum (inclusive).

  - ### Constructor Detail

    - #### LongRange

          public LongRange(String label,
                           long minIn,
                           boolean minInclusive,
                           long maxIn,
                           boolean maxInclusive)

      Create a LongRange.

  - ### Method Detail

    - #### accept

          public boolean accept(long value)

      True if this range accepts the provided value.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object _that)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getQuery

          public Query getQuery(Query fastMatchQuery,
                                LongValuesSource valueSource)

      Create a Query that matches documents in this range The query will check all documents that match the provided match query, or every document in the index if the match query is null. If the value source is static, eg an indexed numeric field, it may be faster to use `PointRangeQuery`
      Parameters:
        `fastMatchQuery` - a query to use as a filter
        `valueSource` - the source of values for the range check

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