How does MongoDB implement spatial indexes?

The current implementation encodes geographic hash codes on standard MongoDB B-trees. The results of $ near queries are accurate. One limitation with this encoding, while fast, is that prefix searches do not give exact results, especially in the areas of bit flip. MongoDB solves this problem by looking for grid neighbors after the initial scan of the prefix to select before any deviations. This generally ensures that productivity remains very high while providing the right results.

Does this mean that Mongodb split the earth into several grids?

+5
source share
1 answer

Greg Studer (10gen) :   MongoDB.

, MongoDB 2.2, 2-D GeoHash :

By default, precision is set to 26 bits which is equivalent to approximately
2 feet given (longitude, latitude) location values and default (-180, 180)
bounds.

GeoHash , , . MongoDB Geospatial Haystack Index, "" / (: " 25 " foo ").

(Thermopylae) B-tree/GeoHash R-. 8, , :   RTree MongoDB - MongoDC.

+6

All Articles