Sort not working in Mongo


#1

When using sort in a query, the sort is case sensitive. I am using MongoDB 3.4.


#2

Can you post your code, so others can debug please.


#3

myColl.find({},{sort: { title: 1 }}).fetch();


#4

Apparently you have to make special index for this: https://jira.mongodb.org/browse/SERVER-90.

I am unsure whether this is supported in minimongo.

As a workaround you can try adding a lowercased copy of your field to your collection, on which you perform the sort: http://stackoverflow.com/questions/12205546/meteor-sort-case-insensitive.