public class GeohashCellFilter 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.GeohashCellFilter
is defined as:
"geohash_bbox" { "field":"location", "geohash":"u33d8u5dkx8k", "neighbors":false }
Modifier and Type | Class and Description |
---|---|
static class |
GeohashCellFilter.Builder
Builder for a geohashfilter.
|
static class |
GeohashCellFilter.Parser |
Modifier and Type | Field and Description |
---|---|
static String |
CACHE |
static String |
CACHE_KEY |
static String |
NAME |
static String |
NEIGHBORS |
static String |
PRECISION |
Constructor and Description |
---|
GeohashCellFilter() |
Modifier and Type | Method and Description |
---|---|
static org.apache.lucene.search.Filter |
create(QueryParseContext context,
GeoPointFieldMapper fieldMapper,
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 final String CACHE
public static final String CACHE_KEY
public static org.apache.lucene.search.Filter create(QueryParseContext context, GeoPointFieldMapper fieldMapper, String geohash, @Nullable List<CharSequence> geohashes)
context
- Context of the filterfieldMapper
- field mapper for geopointsgeohash
- mandatory geohashgeohashes
- optional array of additional geohashesCopyright © 2009–2015. All rights reserved.