File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
src/django_elasticsearch_dsl_drf Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 2525 'LOOKUP_FILTER_GEO_DISTANCE_TO' ,
2626 'LOOKUP_FILTER_GEO_DISTANCE_INCLUDE_UPPER' ,
2727 'LOOKUP_FILTER_GEO_DISTANCE_INCLUDE_LOWER' ,
28+ 'LOOKUP_FILTER_GEO_POLYGON' ,
2829 'LOOKUP_FILTER_PREFIX' ,
2930 'LOOKUP_FILTER_RANGE' ,
3031 'LOOKUP_FILTER_TERM' ,
292293# /api/articles/?location__geo_distance_include_lower=2km|43.53|-12.23
293294LOOKUP_FILTER_GEO_DISTANCE_INCLUDE_LOWER = 'geo_distance_include_lower'
294295
296+ # Geo Polygon Query
297+ #
298+ # A query allowing to include hits that only fall within a polygon of points.
299+ # Here is an example:
300+ #
301+ # GET /_search
302+ # {
303+ # "query": {
304+ # "bool" : {
305+ # "must" : {
306+ # "match_all" : {}
307+ # },
308+ # "filter" : {
309+ # "geo_polygon" : {
310+ # "person.location" : {
311+ # "points" : [
312+ # {"lat" : 40, "lon" : -70},
313+ # {"lat" : 30, "lon" : -80},
314+ # {"lat" : 20, "lon" : -90}
315+ # ]
316+ # }
317+ # }
318+ # }
319+ # }
320+ # }
321+ # }
322+ #
323+ # Query options:
324+ #
325+ # - _name: Optional name field to identify the filter
326+ # - validation_method: Set to IGNORE_MALFORMED to accept geo points with
327+ # invalid latitude or longitude, COERCE to try and infer correct latitude or
328+ # longitude, or STRICT (default is STRICT).
329+ LOOKUP_FILTER_GEO_POLYGON = 'geo_polygon'
330+
295331# ****************************************************************************
296332# ************************ Functional filters/queries ************************
297333# ****************************************************************************
You can’t perform that action at this time.
0 commit comments