blob: 1bc4197e5b382260120b7f1157f4332f457e51d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
[[query-dsl-geo-distance-range-filter]]
=== Geo Distance Range Filter
Filters documents that exists within a range from a specific point:
[source,js]
--------------------------------------------------
{
"filtered" : {
"query" : {
"match_all" : {}
},
"filter" : {
"geo_distance_range" : {
"from" : "200km",
"to" : "400km"
"pin.location" : {
"lat" : 40,
"lon" : -70
}
}
}
}
}
--------------------------------------------------
Supports the same point location parameter as the
<<query-dsl-geo-distance-filter,geo_distance>>
filter. And also support the common parameters for range (lt, lte, gt,
gte, from, to, include_upper and include_lower).
|