@Q:
FOR startCity IN germanCity
FILTER GEO_DISTANCE(@bonn, startCity.geometry) < @radius
RETURN startCity._key
@B
{
"bonn": [
7.0998,
50.734
],
"radius": 400000
}
@R
Query String:
FOR startCity IN germanCity
FILTER GEO_DISTANCE(@bonn, startCity.geometry) < @radius
RETURN startCity._key
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
7 IndexNode 3 - FOR startCity IN germanCity /* geo index scan */
5 CalculationNode 3 - LET #3 = startCity.`_key` /* attribute expression */ /* collections used: startCity : germanCity */
6 ReturnNode 3 - RETURN #3
Indexes used:
By Type Collection Unique Sparse Selectivity Fields Ranges
7 geo germanCity false true n/a [ `geometry` ] (GEO_DISTANCE([ 7.0998, 50.734 ], startCity.`geometry`) < 400000)
Optimization rules applied:
Id RuleName
1 move-calculations-up
2 move-filters-up
3 move-calculations-up-2
4 move-filters-up-2
5 geo-index-optimizer
6 remove-unnecessary-calculations-2