geoNear stage on agregation

I am trying to add a stage with geoNear operator, but i get error on server.

pipeline = [
{
geoNear: {
near: { type: “GeoPoint”, coordinates: [4.8078815, 75.6917359] },
distanceField: “dist.calculated”,
minDistance: 2,
query: { type: “public” },
includeLocs: “dist.location”,
num: 5,
spherical: true
}
}
]

Someone know how do to use it?

I believe this pr fixes your problem,: Remove Stage name check on aggregate pipelines by BRETT71 · Pull Request #7237 · parse-community/parse-server · GitHub

Could you please try with the current master branch?

finally i could run stage, but the result is not the waited, cause return all records without take geolocation specific, also i added the index for 2dsphere.

pipeline = [
{
geoNear: {
near: [latitude, longitude],
key: “location”,
distanceField: “dist.calculated”,
maxDistance: 500,
spherical: true,
query: { status: true }
}
}
];