You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FOR alias_arbre IN avatar
FILTER alias_arbre.iri == "http://www.example.com/rennes/polygon/tree_17683"
FOR a IN avatar FILTER GEO_DISTANCE(alias_arbre.cG9z_geom_point,a.cG9seWdvbg_geom_polygon)<1000
FILTER a.domain == "http://www.example.com/rennes/polygon/"
FILTER a.cG9seWdvbg_geom_polygon != null
RETURN [GEO_DISTANCE(alias_arbre.cG9z_geom_point,a.cG9seWdvbg_geom_polygon),a]
AQL explain and/or profile (if applicable):
Query String (394 chars, cacheable: true):
FOR alias_arbre IN avatar FILTER alias_arbre.iri ==
"http://www.example.com/rennes/polygon/tree_17683"
FOR a IN avatar FILTER GEO_DISTANCE(alias_arbre.cG9z_geom_point,a.cG9seWdvbg_geom_polygon)<1000
FILTER a.domain == "http://www.example.com/rennes/polygon/"
FILTER a.cG9seWdvbg_geom_polygon != null
RETURN [GEO_DISTANCE(alias_arbre.cG9z_geom_point,a.cG9seWdvbg_geom_polygon),a]
Execution plan:
Id NodeType Est. Comment
1 SingletonNode 1 * ROOT
15 IndexNode 1 - FOR alias_arbre IN avatar /* persistent index scan, index scan + document lookup (projections: `cG9z_geom_point`) */
14 IndexNode 25 - FOR a IN avatar /* geo index scan, index scan + document lookup */ FILTER (a.`domain` == "http://www.example.com/rennes/polygon/") /* early pruning */
12 CalculationNode 25 - LET #10 = [ GEO_DISTANCE(alias_arbre.`cG9z_geom_point`, a.`cG9seWdvbg_geom_polygon`), a ] /* simple expression */ /* collections used: alias_arbre : avatar, a : avatar */
13 ReturnNode 25 - RETURN #10
Indexes used:
By Name Type Collection Unique Sparse Cache Selectivity Fields Stored values Ranges
15 avatar_iri_index persistent avatar false false false 99.69 % [ `iri` ] [ ] (alias_arbre.`iri` == "http://www.example.com/rennes/polygon/tree_17683")
14 cG9seWdvbg_geom_polygon_index geo avatar false true false n/a [ `cG9seWdvbg_geom_polygon` ] [ ] (GEO_DISTANCE(alias_arbre.`cG9z_geom_point`, a.`cG9seWdvbg_geom_polygon`) < 1000)
Functions used:
Name Deterministic Cacheable Uses V8
GEO_DISTANCE true true false
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 use-indexes
7 remove-filter-covered-by-index
8 remove-unnecessary-calculations-2
9 move-filters-into-enumerate
10 reduce-extraction-to-projection
43 rule(s) executed, 1 plan(s) created, peak mem [b]: 0, exec time [s]: 0.00055
create appropriate collection 'avatar' with geo indexes in legacy mode in fields cG9seWdvbg_geom_polygon and cG9z_geom_point
put the 2 documents above in the 'avatar' collection
run the above query
Problem & Expected result:
This test case is using old polygons which do not comply with the new GeoJson standard. We activate the legacy mode on the geo indexes to get the same behaviour as previous versions of arangoDB (3.9 and below).
The returned resultset should contain the objects with a polygon property in a 1km radius.
The query does make use of the geo index, and returns the expected object, however, the GEO_DISTANCE expression is not consistent when evaluated outside of the use of the geo index. Here the resulting GEO_DISTANCE value is 20014934.236066904, as in the resultset below. This value doesn't make sense as the query should then have filtered it out (GEO_DISTANCE > 1000).
Assumption: the legacy mode is taken into account by the index but not in any other geo function evaluation.
In the current state since using the same function twice in one query is not consistent, I would argue the legacy mode is too restrictive in its usage.
On our side we will just move on to the new version and ignore the legacy mode.
My Environment
Component, Query & Data
Affected feature:
AQL query - GEO functions
AQL query (if applicable):
AQL explain and/or profile (if applicable):
Dataset:
Size of your Dataset on disk:
N/A
Steps to reproduce
Problem & Expected result:
This test case is using old polygons which do not comply with the new GeoJson standard. We activate the legacy mode on the geo indexes to get the same behaviour as previous versions of arangoDB (3.9 and below).
The returned resultset should contain the objects with a polygon property in a 1km radius.
The query does make use of the geo index, and returns the expected object, however, the GEO_DISTANCE expression is not consistent when evaluated outside of the use of the geo index. Here the resulting GEO_DISTANCE value is 20014934.236066904, as in the resultset below. This value doesn't make sense as the query should then have filtered it out (GEO_DISTANCE > 1000).
Assumption: the legacy mode is taken into account by the index but not in any other geo function evaluation.
Result:
The text was updated successfully, but these errors were encountered: