[Fixed]-MongoDB $skip + $limit duplicates in find results

1👍

Ok, the problem is about $sort + $limit MongoDB optimization. When we got $limit right after $sort, MongoDB optimizer sorting only objects we got in $limit result.

Source (MongoDB docs): https://docs.mongodb.com/manual/core/aggregation-pipeline-optimization/#agg-sort-limit-coalescence

👤vadimb

Leave a comment