Liatz
Liatz

Reputation: 5207

mongodb error : invalid operator: $maxDistance

MongoDB shell version: 2.1.0

$near operator works fine. But as I try (in mongodb shell and nodejs): 

db.locations.find({loc: {$near:[50,50],$maxDistance:50}})

error: { "$err" : "invalid operator: $maxDistance" }

I tried upgrading mongodb (if you know an easy way to do this I would really really thank you as I had a lot of trouble with trying to shut down the server in order to replace the bin folder...)

Thank you!

Upvotes: 1

Views: 324

Answers (1)

Liatz
Liatz

Reputation: 5207

upgrading mongodb solved the problem. 10x!

Upvotes: 1

Related Questions