[DOCS-9596] Comment on: "manual/reference/command/geoNear.txt" Created: 06/Dec/16  Updated: 30/Oct/23  Resolved: 24/Mar/23

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Docs Collector User (Inactive) Assignee: Ravind Kumar (Inactive)
Resolution: Won't Do Votes: 0
Labels: collector-298ba4e7
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

mongodb 3.2.7

Location: https://docs.mongodb.com/v3.2/reference/command/geoNear/#dbcmd.geoNear
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
Referrer: https://docs.mongodb.com/v3.2/reference/command/
Screen Resolution: 1366 x 768


Participants:
Days since reply: 45 weeks, 5 days ago

 Description   

In my document there is a array which contain the point, below is an example:
{
"detail": [
{
"name":"jack",
"loc":

{ "lng":113.166, "lat":23.4485 }

},
{
"name":"tom",
"loc":

{ "lng":113.163, "lat":23.447 }

}
]
}
When I use command to search:
db.runCommand( { geoNear:"Table1" ,
near:

{ type: "Point" , coordinates: [113.167294, 23.447903] }

,
spherical: true,
includeLocs:true,
uniqueDocs:true,
maxDistance: 300
} )
I want "jack" to be return but "tom" because the distance between tom and [113.167294, 23.447903] is larger then 300 meters. But the command return all of them.
How do I limit the result which is just match the condition in Array. Thanks



 Comments   
Comment by Sarah Olson [ 24/Mar/23 ]

Closing this out on the grounds that:

  • Details of this request are significantly outdated. 
  • Our documentation has evolved substantially since this request was made. 

Based on this, closing as WON'T DO. Please don't hesitate to give me a shout or to reopen if you disagree.

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