astroanu
astroanu

Reputation: 3971

MongoDb Multiple $geoWithin with $or

I want to query $geoWithin with $or.

.find({"$or":[{"loc":{"$within":{"$center":[[79.853449,6.906746],5]}}},{"loc":{"$within":{"$center":[[10.853449,2.906746],5]}}}]})

and i get "$or may not contain 'special' query". what am i doing wrong? im using the latest mongodb

Upvotes: 0

Views: 670

Answers (1)

Asya Kamsky
Asya Kamsky

Reputation: 42352

This feature (ability to include $geo queries inside $or clauses) was not supported in the current (2.4) or previous versions of MongoDB.

As of 2.5.5 (development release!) it will be supported, as well as in 2.6 production release. For details see https://jira.mongodb.org/browse/SERVER-3984

Upvotes: 3

Related Questions