[DOCS-2522] Strategies for working with Limited Number of Geo Indexes in a Collection Created: 13/Jan/14  Updated: 03/Nov/17  Resolved: 15/Oct/14

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Improvement Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Unassigned
Resolution: Done Votes: 1
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Location: http://docs.mongodb.org/manual/core/2dsphere/
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36
Referrer: http://docs.mongodb.org/manual/applications/geospatial-indexes/
Screen Resolution: 1366 x 768
repo: docs
source: core/2dsphere


Participants:
Days since reply: 9 years, 18 weeks ago

 Description   

hi,

I noticed that "MongoDB allows only one geospatial index per collection", I still want to ask if there is any solution if I want to query 2 loctions in one collection, like I have start point and end point in my collection, and I want to find the ones near a specific start point as well as near a specific end point.

Any suggestion is appreciated.



 Comments   
Comment by Sam Kleinman (Inactive) [ 15/Oct/14 ]

these kinds of questions are best addressed to one of our support channels <http://www.mongodb.org/about/support/>.

I think $maxDistance (http://docs.mongodb.org/manual/reference/operator/query/maxDistance/) or a polygon search might provide the kind of results you're looking for in this case.

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