public final class XGeoPointDistanceRangeQuery
extends org.apache.lucene.spatial.geopoint.search.GeoPointDistanceQuery
org.apache.lucene.spatial.geopoint.search.GeoPointDistanceQuery and is implemented using a
org.apache.lucene.search.BooleanClause.MUST_NOT clause to exclude any points that fall within
minRadiusMeters from the provided point.
NOTE: this query does not correctly support multi-value docs (see: https://issues.apache.org/jira/browse/LUCENE-7126)
TODO: remove this per ISSUE #17658
| Modifier and Type | Field and Description |
|---|---|
protected double |
minRadiusMeters
minimum distance range (in meters) from lat, lon center location, maximum is inherited
|
| Constructor and Description |
|---|
XGeoPointDistanceRangeQuery(java.lang.String field,
double centerLat,
double centerLon,
double minRadiusMeters,
double maxRadiusMeters)
Constructs a query for all
GeoPointField types within a minimum / maximum
distance (in meters) range from a given point |
XGeoPointDistanceRangeQuery(java.lang.String field,
org.apache.lucene.spatial.geopoint.document.GeoPointField.TermEncoding termEncoding,
double centerLat,
double centerLon,
double minRadiusMeters,
double maxRadius)
Constructs a query for all
GeoPointField types within a minimum / maximum
distance (in meters) range from a given point. |
| Modifier and Type | Method and Description |
|---|---|
double |
getMaxRadiusMeters()
getter method for maximum distance
|
double |
getMinRadiusMeters()
getter method for minimum distance
|
org.apache.lucene.search.Query |
rewrite(org.apache.lucene.index.IndexReader reader) |
java.lang.String |
toString(java.lang.String field) |
equals, getCenterLat, getCenterLon, getRadiusMeters, hashCodegetField, getMaxLat, getMaxLon, getMinLat, getMinLonprotected final double minRadiusMeters
public XGeoPointDistanceRangeQuery(java.lang.String field,
double centerLat,
double centerLon,
double minRadiusMeters,
double maxRadiusMeters)
GeoPointField types within a minimum / maximum
distance (in meters) range from a given pointpublic XGeoPointDistanceRangeQuery(java.lang.String field,
org.apache.lucene.spatial.geopoint.document.GeoPointField.TermEncoding termEncoding,
double centerLat,
double centerLon,
double minRadiusMeters,
double maxRadius)
GeoPointField types within a minimum / maximum
distance (in meters) range from a given point. Accepts an optional
GeoPointField.TermEncodingpublic org.apache.lucene.search.Query rewrite(org.apache.lucene.index.IndexReader reader)
rewrite in class org.apache.lucene.spatial.geopoint.search.GeoPointDistanceQuerypublic java.lang.String toString(java.lang.String field)
toString in class org.apache.lucene.spatial.geopoint.search.GeoPointDistanceQuerypublic double getMinRadiusMeters()
public double getMaxRadiusMeters()