Hello All,
I'm trying to understand the internals of how the spatial indexing and querying works in MongoDB.
By doing some tracing, I found out how the 2dsphere index works for inserts and deletes - the S2AccessMethods's getKeys() is invoked to get the keys that cover the shape that are then inserted to the b-tree based index.
However, I am not able to find how querying works since getKeys() method doesn't seem to get invoked in any queries. I would have assumed that the getKeys() is useful to filter which all keys in the tree to consider for the query.
Can a MongoDB expert point me to the right direction on where should I look? Thank you very much!
-Anand