I want to make my Email
field in my collection a case-insensitive index. The official docs say to use Collation for this, with a strength value of 1 or 2.
On the docs, it says that level 1 performs comparsion for base characters only, while level 2 also include diacritics.
I’d like to ask the following:
- If my document
Email
field isgil@gmail.com
. For level 1, this will pass:ġil@gmail.com
, but with level 2 it won’t pass since it includes diacritics. Correct? - What is level 3? What does “tertiarty differences” mean? Can you give me examples using the example I provided?
- Is there performance degrading when using indexes with collation? How does the string comparsion work behind the scenes? Should I just normalize the
Email
field to be lowercase when I add new users since collation might hurt performance?