I am using the code snupped as below :
if (collection.find(toFind) != null) {
dataFound = collection.find(toFind).first();
} else {
System.err.println("NULL");
}
As collection.find() is being called twice here, will that be performing 2 searches on database or becasue it returns a FindIterable, its just a cusror???
We are restricted to limit the database operations and avoid as much necessary, as we are paying it per request unit