Priority: Major - P3
Affects Version/s: 2.6.1
Fix Version/s: None
Sprint:RPL 0 3/13/15
I have a collection with documents, which contain a datetime field 'from' (and also 'to', but that was not used in queries) and multiple polygons.
Until Version 2.4.10 I solved that by having an array of geometry subdocuments in "location.geometry".
The index looked like that and worked very well. I had query times of ~50ms
Version 2.6 supports MultiPolygons and it seems, that my workaround of manual "multi polygons" does not work anymore. The query times are much slower now.
I converted my polygons to use MultiPolygons in the field "geometry" and now I try to get the queries as fast as in 2.4.
The pure geo query: (on 2.6.1 the geo field name is "geometry")
Both versions return 4599 results.
It's faster on 2.6.1. Here it takes 548 ms against 1691 ms on 2.4.10
But when I query for the date and the location, it get's problematic. The full query is: (on 2.6.1 the geo field name is "geometry")
On 2.4.10 the query takes only 49 ms:
But on 2.6.1 the query takes ~200ms and the number of results differs a lot:
The indexBounds look a bit strange. If I instead query just for a date (with an index onthe bounds look correct:
What is the correct way, to index and query a collection for a specific date and geo location?
Or how can I optimize the data structure?
Thanks a lot!