[SERVER-40606] my $geonear function is not returning the expected Created: 12/Apr/19  Updated: 29/May/19  Resolved: 29/May/19

Status: Closed
Project: Core Server
Component/s: Admin, Aggregation Framework, Index Maintenance
Affects Version/s: 3.4 Required
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: Shubhanshu Soni Assignee: Eric Sedor
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

my $geonear function is not returning the expected array of nearest driver in my collection.

i am running these queries to get the result.

to create indexes for geonear i used:

db.dectar_drivers.createIndex({point:"2dsphere"});

to find the nearest driver i have used:

db.dectar_drivers.aggregate([
{
$geoNear: {
near: { type: "Point", coordinates: [ 22.7323132 ,75.8753951] },
distanceField: "total_mileage",
maxDistance: 200,
includeLocs: "loc",
num: 5,
spherical: true
}
}
])



 Comments   
Comment by Eric Sedor [ 29/May/19 ]

Hi,

We haven’t heard back from you for some time, so I’m going to mark this ticket as resolved. If this is still an issue for you, please provide additional information and we will reopen the ticket.

Regards,

Eric

Comment by Eric Sedor [ 12/Apr/19 ]

It may be best to start troubleshooting with the MongoDB community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag. The SERVER project is for bugs and feature suggestions for the MongoDB server.

If you have a reason to suspect a bug, can you please clarify the difference between the results you are expecting and the results you are getting? We are also curious as to the exact MongoDB version (e.g., 3.4.X).

Generated at Thu Feb 08 04:55:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.