org.apache.lucene.search

## Class DocValuesRangeQuery

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.search.DocValuesRangeQuery

- Deprecated.
  Use factory method on doc value field classes

      @Deprecated
      public final class DocValuesRangeQuery
      extends Query

  A range query that works on top of the doc values APIs. Such queries are usually slow since they do not use an inverted index. However, in the dense case where most documents match this query, it might be as fast or faster than a regular `PointRangeQuery`. NOTE: This query is typically best used within a `IndexOrDocValuesQuery` alongside a query that uses an indexed structure such as `points` or `terms`, which allows to run the query on doc values when that would be more efficient, and using an index otherwise.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Weight` | `createWeight(IndexSearcher searcher, boolean needsScores)` Deprecated.
    `boolean` | `equals(Object other)` Deprecated.
    `String` | `getField()` Deprecated.
    `Object` | `getLowerVal()` Deprecated.
    `Object` | `getUpperVal()` Deprecated.
    `int` | `hashCode()` Deprecated.
    `boolean` | `isIncludeLower()` Deprecated.
    `boolean` | `isIncludeUpper()` Deprecated.
    `static Query` | `newBytesRefRange(String field, BytesRef lowerVal, BytesRef upperVal, boolean includeLower, boolean includeUpper)` Deprecated. use `SortedSetDocValuesField.newRangeQuery(java.lang.String, org.apache.lucene.util.BytesRef, org.apache.lucene.util.BytesRef, boolean, boolean)`
    `static Query` | `newLongRange(String field, Long lowerVal, Long upperVal, boolean includeLower, boolean includeUpper)` Deprecated. use `SortedNumericDocValuesField.newRangeQuery(java.lang.String, long, long)`
    `Query` | `rewrite(IndexReader reader)` Deprecated.
    `String` | `toString(String field)` Deprecated.

    - ### Methods inherited from class org.apache.lucene.search.Query

      `classHash, sameClassAs, toString`

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

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

- - ### Method Detail

    - #### newLongRange

          @Deprecated
          public static Query newLongRange(String field,
                                                       Long lowerVal,
                                                       Long upperVal,
                                                       boolean includeLower,
                                                       boolean includeUpper)

      Deprecated. use `SortedNumericDocValuesField.newRangeQuery(java.lang.String, long, long)`
      Create a new numeric range query on a numeric doc-values field. The field must has been indexed with either `DocValuesType.NUMERIC` or `DocValuesType.SORTED_NUMERIC` doc values.

    - #### newBytesRefRange

          public static Query newBytesRefRange(String field,
                                               BytesRef lowerVal,
                                               BytesRef upperVal,
                                               boolean includeLower,
                                               boolean includeUpper)

      Deprecated. use `SortedSetDocValuesField.newRangeQuery(java.lang.String, org.apache.lucene.util.BytesRef, org.apache.lucene.util.BytesRef, boolean, boolean)`
      Create a new numeric range query on a numeric doc-values field. The field must has been indexed with `DocValuesType.SORTED` or `DocValuesType.SORTED_SET` doc values.

    - #### equals

          public boolean equals(Object other)

      Deprecated.
      Specified by:
        `equals` in class `Query`

    - #### hashCode

          public int hashCode()

      Deprecated.
      Specified by:
        `hashCode` in class `Query`

    - #### getField

          public String getField()

      Deprecated.

    - #### getLowerVal

          public Object getLowerVal()

      Deprecated.

    - #### getUpperVal

          public Object getUpperVal()

      Deprecated.

    - #### isIncludeLower

          public boolean isIncludeLower()

      Deprecated.

    - #### isIncludeUpper

          public boolean isIncludeUpper()

      Deprecated.

    - #### toString

          public String toString(String field)

      Deprecated.
      Specified by:
        `toString` in class `Query`

    - #### rewrite

          public Query rewrite(IndexReader reader)
                        throws IOException

      Deprecated.
      Overrides:
        `rewrite` in class `Query`
      Throws:
        `IOException`

    - #### createWeight

          public Weight createWeight(IndexSearcher searcher,
                                     boolean needsScores)
                              throws IOException

      Deprecated.
      Overrides:
        `createWeight` in class `Query`
      Throws:
        `IOException`

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