Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the internals of mongodb 2dsphere index?

Mongodb site shows the internals of 2d index is GeoHash.

I want to know the internals of 2dsphere index.

Is it GeoHash, Cartesian Tiers or other techs?

I just find the blog of mongodb site, new-geo-features, to introduce 2dsphere index.

But there is no detail.

like image 806
efei Avatar asked Oct 18 '22 11:10

efei


1 Answers

The blog post you linked to says a few things about how the 2dsphere index is implemented. It uses Google's S2 Geometry Library to create grid cells on the surface of the earth and put them in a B-tree so they can be searched quickly.

The link in the blog post is obsolete, since Google Code is no longer active. The repository for S2 can now be seen here.

like image 87
Elias Zamaria Avatar answered Oct 21 '22 05:10

Elias Zamaria