Alternativement à la réponse de @wdberkeley, vous pouvez utiliser $geoWithin au lieu du $geoNear scène.
db.landmarkSchema.aggregate([
{$match: {
$text: {$search: "great test text"} ,
loc: {$geoWithin: {$centerSphere: [[ 14.3, 48.3], 5/6731]}}
}}])
Remarque :L'index géographique ne sera pas utilisé !
Plus d'informations :https://docs.mongodb.org/manual/reference /operator/query/geoWithin/