meteor-feature-requests
meteor-feature-requests copied to clipboard
Collation support for find/findOne
Mongodb 3.4 allows the use of collations. This is a huge development they should have done long ago. Meteor should support should be implemented ASAP. It also should be easy to do. Basically this is all that is needed: updating find and findOne to support the collation argument.
In raw mongodb you do collection.find({query}).collation({ locale: "en", strength: 2 });
In meteor it should be collection.find({query},{collation:{ locale: "en", strength: 2 }});
Would this be needed in minimongo also? if so I believe it might be a bigger challenge.
Well not really because I can always just do a custom sort on the client side once I get the data. However on the server a core modification is needed because it's about interacting with the database.
In the mean time I realized that you can create new collections with a default collation for now that will be used automatically.
I found out that, unfortunately, the new collations don't support regexes like /^firstna/i, so they are not as functional yet as I had hoped.