Currently, MongoDB supports only one geospatial index per collection. How can I workaround this manually?
Is there some smart way to emulate this kind of index without losing too much accuracy?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You probably can create a second collection, which will hold only the (same) object-id, and the secondary geospatial index.
when you want to query for the secondary index, you’d query that second collection, get the list of ids back, and then query the master collection by ids.