{ "_id" : { "$oid" : "52568424036439f2c5107571"} , "start" : { "x:" : 71 , "y:" : 9} , "end" : { "x:" : 30 , "y:" : 84}}
{ "_id" : { "$oid" : "52568424036439f2c5107572"} , "start" : { "x:" : 28 , "y:" : 59} , "end" : { "x:" : 72 , "y:" : 64}}
{ "_id" : { "$oid" : "52568424036439f2c5107573"} , "start" : { "x:" : 16 , "y:" : 71} , "end" : { "x:" : 18 , "y:" : 79}}
Need all docs say where start.x > 40
Query tried mongoDb console :
db.lines.find({"start.x": {$gt:40} })
Java Driver:
DBObject query = QueryBuilder.start("start.x").greaterThan(50).get();
collection.find(query)
Both cases no error, no documents retrieved.