While JSON documents are unordered, in MongoDB there are several places where order matters. The most important ones to remember are:
- sort order
- index specification order
When you specify a sort, the sort order will follow the order of fields, so in your case it would be .sort({pinned:1,score:1,newest:1})
you can see an example in the documentation.
Some operations expect fields in particular order.
It also matters for subdocuments if you are trying to match them (whereas top level field order in the query does not matter).