Can be worked around by having the geospatial criteria outside of the
$and eg
db.place.findOne({$and:[{"fooKey":"forValue"}, {"barKey":"barValue"}],
"geometry.centroid": { $near: [ -37.817532, 144.967148 ],
$maxDistance: 5.0 }}, {"identity":1, "geometry":1})
On Dec 28, 1:40 pm, markdsievers <
mark.siev...@gmail.com> wrote:
> Or indeed using the geospatial query as the only criteria in the $and
> operator yields the same result (having only one criteria seems to be
> okay for $and using non-spatial indexes)
>
> db.place.findOne({$and:[{ "geometry.centroid": { $near: [ -37.817532,
> 144.967148 ], $maxDistance: 5.0 }}]}, {"identity":1, "geometry":1})