You should use the "$snapshot" query operator.
https://docs.mongodb.org/v3.0/reference/operator/meta/snapshot/
--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
Â
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/d9d14eee-32d2-403a-8933-bc5f68f03e64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Yes but immeadiatly above that it says
"The $snapshot operator prevents the cursor from returning a document more than once because an intervening write operation results in a move of the document."
The original complaint was about duplicated objects appearing in the output.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/b045faa8-f7bf-4bd9-b577-899b511990a5%40googlegroups.com.
What about updates that would have changed the sort key position?.
The duplicates don't happen in the same page. They happen across pages. Since I am ordering by destination number, there should be no duplicates across pages right ?ÂP.S There are no inserts that would have added results to the query during its paging.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/1c049ef7-70a9-48ec-b2aa-dc290c3009e0%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CA%2B5Txvjgn975VeAqqP2Z_eBma6h6qPVtiUakbqA0Tt_ozhOEdw%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/CA%2B5TxvhtMJ1i4V8-M1n%2By58fYMaNJXTkYHAZVWNDT0HHc%2BV3Mg%40mail.gmail.com.