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?


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))



All Articles