limitedTo not working
burf2000 opened this issue · comments
I am trying to run some benchmarking tests so I want to limit the find to 1000 records
let matchingEntities: CollectionSlice<Document> = try pages.find(nil, sortedBy: nil, projecting: nil, readConcern: nil, collation: nil, skipping: 0, limitedTo: 1000)
print(try matchingEntities.count())
The print returns a count of 17696. Am I misusing this command?
Ok, so the amount of documents returned is 1000, but the count returns a different number?
Your questions were a very hectic period that year. That API was very confusing in many ways, we've removed it since. The count was not using the limitedTo parameter, I'm pretty sure.