-
Type: New Feature
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 7.3
-
Component/s: Elasticsearch
-
Tags:
A string field that contains a geolocation of the following format:
- "41.12,-71.34": latitude and longitude
- "drm3btev3e86": geohash
can be indexed and filtered by Elasticsearch if the proper mapping is defined.
Here the list of filter that can be supported via NXQL hints:
- geo_bounding location in a bounding box, first param is top_left then bottom_right point
SELECT * FROM Document WHERE /*+ES: OPERATOR(geo_bounding_box) */ osm:location IN ('40.73, -74.1', '40.01, -71.12')
- geo_distance location inside a circle, much slower than bounding box
SELECT * FROM Document WHERE /*+ES: OPERATOR(geo_distance) */ osm:location IN ('40.73, -74.1', '200km')
- geo_distance_range location between 200km and 400km, slow
SELECT * FROM Document WHERE /*+ES: OPERATOR(geo_distance_range) */ osm:location IN ('40.73, -74.1', '200km', '400km')
- geo_hash_cell location near a point using geohash
here level 5 precision is ~5kmx5km, fast operationSELECT * FROM Document WHERE /*+ES: OPERATOR(geo_hash_cell) */ osm:location IN ('40.73, -74.1', '5') -- location can use geohash instead of latitude longitude SELECT * FROM Document WHERE /*+ES: OPERATOR(geo_hash_cell) */ osm:location IN ('drm3btev3e86', '5')
- geo_shape location inside a shape, the shape must be defined in an other ES index
SELECT * FROM Document WHERE /*+ES: OPERATOR(geo_shape) */ osm:location IN ('FRA', 'countries', 'shapes', 'location');
- is required by
-
NXS-2615 Add new Hints operators for geolocation into Studio
- Resolved