Hey everyone, I’ve encountered something odd, not sure if this is the expected behaviour or I’m doing something wrong.
I’m having this line: Transfers.find(query, {sort:{‘timestamp’:1}, limit:100}).fetch().
I would expect the following order:
- query is executed, documents selected by that,
- documents are sorted by timestamp
- limit is applied
Instead, what I seem to be getting is:
- all documents are sorted by timestamp
- limit is applied
- query is executed and matching docs returned.
How can I achieve the first behaviour? Or, what am I doing wrong?
Thanks!