开发者

How to workaround MongoDB's current limitation of just one geospatial index per collection?

Currently, MongoDB supports only one geospatial index pe开发者_如何学Pythonr collection. How can I workaround this manually?

Is there some smart way to emulate this kind of index without losing too much accuracy?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜