Can geoNear in MongoDB return a subset of fields in a document?

When using geoNear, it returns all fields / whole document for the objects it finds, is there a way to limit it to a subset of fields?

+3
mongodb


source to share


1 answer


This is currently not supported. The only workaround is to use $ near and calculate the distance (dist = sqrt (dx * dx + dy * dy))



0


source to share







All Articles
Loading...
X
Show
Funny
Dev
Pics