public class GeohashCellQuery
extends java.lang.Object
GeoPoint
s by their geohashes. Basically the a
Geohash prefix is defined by the filter and all geohashes that are matching this
prefix will be returned. The neighbors
flag allows to filter
geohashes that surround the given geohash. In general the neighborhood of a
geohash is defined by its eight adjacent cells.GeohashCellQuery
is defined as:
"geohash_bbox" { "field":"location", "geohash":"u33d8u5dkx8k", "neighbors":false }
Modifier and Type | Class and Description |
---|---|
static class |
GeohashCellQuery.Builder
Builder for a geohashfilter.
|
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_IGNORE_UNMAPPED
The default value for ignore_unmapped.
|
static boolean |
DEFAULT_NEIGHBORS |
static java.lang.String |
NAME |
Constructor and Description |
---|
GeohashCellQuery() |
Modifier and Type | Method and Description |
---|---|
static org.apache.lucene.search.Query |
create(QueryShardContext context,
BaseGeoPointFieldMapper.LegacyGeoPointFieldType fieldType,
java.lang.String geohash,
java.util.List<java.lang.CharSequence> geohashes)
Create a new geohash filter for a given set of geohashes.
|
public static final java.lang.String NAME
public static final boolean DEFAULT_NEIGHBORS
public static final boolean DEFAULT_IGNORE_UNMAPPED
public static org.apache.lucene.search.Query create(QueryShardContext context, BaseGeoPointFieldMapper.LegacyGeoPointFieldType fieldType, java.lang.String geohash, @Nullable java.util.List<java.lang.CharSequence> geohashes)
context
- Context of the filterfieldType
- field mapper for geopointsgeohash
- mandatory geohashgeohashes
- optional array of additional geohashes