OpenSearch/docs/reference/query-dsl/geo-distance-range-query.asciidoc
Isabel Drost-Fromm 4c02e97bcd Add back doc execution to query dsl.
Relates to #18211

This reverts commit 20aafb1196192d4f9f7faea8ce9a36b278e501a1.
2016-05-24 12:43:41 +02:00

44 lines
1.3 KiB
Plaintext

[[query-dsl-geo-distance-range-query]]
=== Geo Distance Range Query
Filters documents that exists within a range from a specific point:
[source,js]
--------------------------------------------------
GET /_search
{
"query": {
"bool" : {
"must" : {
"match_all" : {}
},
"filter" : {
"geo_distance_range" : {
"from" : "200km",
"to" : "400km",
"pin.location" : {
"lat" : 40,
"lon" : -70
}
}
}
}
}
}
--------------------------------------------------
// CONSOLE
Supports the same point location parameter and query options as the
<<query-dsl-geo-distance-query,geo_distance>>
filter. And also support the common parameters for range (lt, lte, gt,
gte, from, to, include_upper and include_lower).
[float]
==== Ignore Unmapped
When set to `true` the `ignore_unmapped` option will ignore an unmapped field
and will not match any documents for this query. This can be useful when
querying multiple indexes which might have different mappings. When set to
`false` (the default value) the query will throw an exception if the field
is not mapped.