I have a collection with documents that have the following fields:
descriptionstatefield_num
I would like to return a cursor to all the documents that meet the following critiria:
- have status "complete"
- and field_num greater than 100
- and that their description does not contain "abc" pattern?
Is this query correct?
DBObject query = new BasicDBObject("$gte",99)
.append("status","complete")
.append("description", new BasicDBObject("$not", ".*abc")))
DBCursor cursor = collection.find("collection name", query, projection)
$gteis "greater than or equals 99". That is for sure not "greater than 100"