Case insensitive sorting #464
Rivosoa
started this conversation in
Feature Request
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, to make case insensitive sorting in mongodb we need to use collation.
I couldn't find anything about collation in the documentation. I found a solution here #111 (comment) but it still gave me a little struggle to make it work. I'm not sure if I did it correctly but it works.
I think beanie should have an easier way for doing case insensitive sorting.
Here's how I made my code work by following the solution I linked above
And then I call
MyDocument.find_insensitive().sort(MyDocument.name)
Beta Was this translation helpful? Give feedback.
All reactions