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
{{ message }}
Repository navigation
Should operations on multi geo indexes emit duplicates? #3351
Assume you have a multi geo index on the field geo and insert the following document:
{id: "abc",geo: [r.point(1,1),r.point(1,1)]}
and then run getIntersecting(r.circle([1, 1], 10), {index: "geo"}) or getNearest(r.point(1, 1), {index: "geo"}) on that table.
Right now you would get only one result from those queries. We could possibly change this to return the document twice. This would be more consistent with how non-geo multi indexes behave when you use getAll or between on them.
Emitting suplicated will require some additional code to implement though. This is because geospatial indexes generally have to filter duplicates, because a single document might appear in multiple places of the index (even without a multi index). We would have to tweak this duplicate filtering to let duplicates that are due to multiple multi index keys through, while still filtering the ones that are due to how the index itself works. We already attach a "tag" to every secondary index key, which is different for each multi index key. We could use this "tag" to distinguish the different types of duplicates.
Activity
danielmewes commentedon Nov 18, 2014
(my personal opinion is that this is not worth doing, i.e. we should just keep the current behavior)
danielmewes commentedon Feb 13, 2016
I went ahead and changed this as part of #4777
This was necessary to make
getIntersectingchangefeeds work in a consistent way.danielmewes commentedon Feb 13, 2016
The change is in code review 3476.
danielmewes commentedon Mar 30, 2016
Since #4777 is delayed because of bugs, this likely won't make it into 2.3 either.
danielmewes commentedon Mar 30, 2016
Implemented in next 9e3bba0
Changefeeds on getIntersecting queries.