creating an index like this:
db.places.ensureIndex(
{ loc : "2d", foo: 1 })
then querying on the index like this fails return the expected result:
db.places.find({loc: {$near: [37.775,-122.4183333]},foo: {$gte: 100}}).sort(
{foo:1});
if you take out the second part of the query (the foo: {$gte: 100}) but leave in the sort then it returns the expected result.