public class GeohashCellQuery extends 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.
|
static class |
GeohashCellQuery.Parser |
Modifier and Type | Field and Description |
---|---|
static String |
NAME |
static String |
NEIGHBORS |
static String |
PRECISION |
Constructor and Description |
---|
GeohashCellQuery() |
Modifier and Type | Method and Description |
---|---|
static org.apache.lucene.search.Query |
create(QueryParseContext context,
BaseGeoPointFieldMapper.GeoPointFieldType fieldType,
String geohash,
List<CharSequence> geohashes)
Create a new geohash filter for a given set of geohashes.
|
public static final String NAME
public static final String NEIGHBORS
public static final String PRECISION
public static org.apache.lucene.search.Query create(QueryParseContext context, BaseGeoPointFieldMapper.GeoPointFieldType fieldType, String geohash, @Nullable List<CharSequence> geohashes)
context
- Context of the filterfieldType
- field mapper for geopointsgeohash
- mandatory geohashgeohashes
- optional array of additional geohashesCopyright © 2009–2017. All rights reserved.