See below query,
db.first.find({name:{$gt:"A"}}) { "_id" : ObjectId("5487373f1b8027ac7cddd0ab"), "name" : "Amit", "age" : 30, "gender" : "M" } { "_id" : ObjectId("548737b71b8027ac7cddd0ac"), "name" : "Amogh", "age" : 5, "gender" : "M" } { "_id" : ObjectId("548737f81b8027ac7cddd0ad"), "name" : "Poonam", "age" : 29, "gender" : "F" }
Because I am filtering the Collection based on Names greater than "A", where I should expect result shown as only below,
{ "_id" : ObjectId("548737f81b8027ac7cddd0ad"), "name" : "Poonam", "age" : 29, "gender" : "F" }
It displays all Three documents even with the name starting as "A".
If this is correct functionality, then what $gte:"A" should print out the documents?
Please let me know if you need any further details.
Thanks,
Amit