[SERVER-44989] Question for Geohashed values and Internals of 2d Sphere index Created: 06/Dec/19  Updated: 06/Dec/22  Resolved: 09/Dec/19

Status: Closed
Project: Core Server
Component/s: Index Maintenance
Affects Version/s: None
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Nikolaos Koutroumanis Assignee: Backlog - Triage Team
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Server Triage
Participants:

 Description   

In MongoDB document, it is mentioned that a 2d Index uses 26 bits of precision.

Are these bits referred to the geohashed values that are stored on the index, or  mentioned for each dimension (x, y) individually (26 for x, 26 for y)? 

Also, a 2d sphere index is composed of geohash values which are fetched for a spatial query. Internally, what kind of operator is used for getting these values for a spatial query? (for instance i could image the $in operator).

 

Thank you,

Nikos



 Comments   
Comment by Danny Hatcher (Inactive) [ 09/Dec/19 ]

You can find our geohashing logic in our codebase at https://github.com/mongodb/mongo/blob/master/src/mongo/db/geo/hash.cpp.

Please note that the SERVER project is for bug reports and feature requests. If you have further questions, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag.

Generated at Thu Feb 08 05:07:33 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.