org.apache.lucene.spatial.geopoint.search

## Class GeoPointInBBoxQuery

- java.lang.Object
- - org.apache.lucene.search.Query
  - - org.apache.lucene.spatial.geopoint.search.GeoPointInBBoxQuery

- Direct Known Subclasses:
    GeoPointDistanceQuery, GeoPointInPolygonQuery

  Deprecated.
  Use the higher performance `LatLonPoint.newBoxQuery` instead.

      @Deprecated
      public class GeoPointInBBoxQuery
      extends Query

  Implements a simple bounding box query on a GeoPoint field. This is inspired by `LegacyNumericRangeQuery` and is implemented using a two phase approach. First, candidate terms are queried using a numeric range based on the morton codes of the min and max lat/lon pairs. Terms passing this initial filter are passed to a final check that verifies whether the decoded lat/lon falls within (or on the boundary) of the query bounding box. NOTES: 1. All latitude/longitude values must be in decimal degrees. 2. Complex computational geometry (e.g., dateline wrapping) is not supported 3. For more advanced GeoSpatial indexing and query operations see spatial module 4. This is well suited for small rectangles, large bounding boxes may result in many terms, depending whether the bounding box falls on the boundary of many cells (degenerate case)
  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `field` Deprecated. field name
    `protected double` | `maxLat` Deprecated. maximum latitude value (in degrees)
    `protected double` | `maxLon` Deprecated. maximum longitude value (in degrees)
    `protected double` | `minLat` Deprecated. minimum latitude value (in degrees)
    `protected double` | `minLon` Deprecated. minimum longitude value (in degrees)
    `protected GeoPointField.TermEncoding` | `termEncoding` Deprecated. term encoding enum to define how the points are encoded (PREFIX or NUMERIC)

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `GeoPointInBBoxQuery(String field, double minLat, double maxLat, double minLon, double maxLon)` Deprecated. Constructs a query for all `GeoPointField` types that fall within a defined bounding box
    `GeoPointInBBoxQuery(String field, GeoPointField.TermEncoding termEncoding, double minLat, double maxLat, double minLon, double maxLon)` Deprecated. Constructs a query for all `GeoPointField` types that fall within a defined bounding box.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object other)` Deprecated.
    `String` | `getField()` Deprecated. getter method for retrieving the field name
    `double` | `getMaxLat()` Deprecated. getter method for retrieving the maximum latitude (in degrees)
    `double` | `getMaxLon()` Deprecated. getter method for retrieving the maximum longitude (in degrees)
    `double` | `getMinLat()` Deprecated. getter method for retrieving the minimum latitude (in degrees)
    `double` | `getMinLon()` Deprecated. getter method for retrieving the minimum longitude (in degrees)
    `int` | `hashCode()` Deprecated.
    `Query` | `rewrite(IndexReader reader)` Deprecated.
    `String` | `toString(String field)` Deprecated.

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

      `classHash, createWeight, sameClassAs, toString`

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

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

- - ### Field Detail

    - #### field

          protected final String field

      Deprecated.
      field name

    - #### minLat

          protected final double minLat

      Deprecated.
      minimum latitude value (in degrees)

    - #### minLon

          protected final double minLon

      Deprecated.
      minimum longitude value (in degrees)

    - #### maxLat

          protected final double maxLat

      Deprecated.
      maximum latitude value (in degrees)

    - #### maxLon

          protected final double maxLon

      Deprecated.
      maximum longitude value (in degrees)

    - #### termEncoding

          protected final GeoPointField.TermEncoding termEncoding

      Deprecated.
      term encoding enum to define how the points are encoded (PREFIX or NUMERIC)

  - ### Constructor Detail

    - #### GeoPointInBBoxQuery

          public GeoPointInBBoxQuery(String field,
                                     double minLat,
                                     double maxLat,
                                     double minLon,
                                     double maxLon)

      Deprecated.
      Constructs a query for all `GeoPointField` types that fall within a defined bounding box

    - #### GeoPointInBBoxQuery

          public GeoPointInBBoxQuery(String field,
                                     GeoPointField.TermEncoding termEncoding,
                                     double minLat,
                                     double maxLat,
                                     double minLon,
                                     double maxLon)

      Deprecated.
      Constructs a query for all `GeoPointField` types that fall within a defined bounding box. Accepts optional `GeoPointField.TermEncoding` parameter

  - ### Method Detail

    - #### rewrite

          public Query rewrite(IndexReader reader)

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

    - #### toString

          public String toString(String field)

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

    - #### 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 final String getField()

      Deprecated.
      getter method for retrieving the field name

    - #### getMinLat

          public final double getMinLat()

      Deprecated.
      getter method for retrieving the minimum latitude (in degrees)

    - #### getMaxLat

          public final double getMaxLat()

      Deprecated.
      getter method for retrieving the maximum latitude (in degrees)

    - #### getMinLon

          public final double getMinLon()

      Deprecated.
      getter method for retrieving the minimum longitude (in degrees)

    - #### getMaxLon

          public final double getMaxLon()

      Deprecated.
      getter method for retrieving the maximum longitude (in degrees)

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