- locale: (string) The locale of the collation. This should be a string that identifies an ICU locale ID exactly. For example,
en_US
is valid, but en_us
and en-US
are not. Consult the MongoDB documentation for a list of supported locales.
- caseLevel: (optional) If
True
, turn on case sensitivity ifstrength is 1 or 2 (case sensitivity is implied if strength is greater than 2). Defaults to False
.
- caseFirst: (optional) Specify that either uppercase or lowercase characters take precedence. Must be one of the following values:
- strength: (optional) Specify the comparison strength. This is also known as the ICU comparison level. This must be one of the following values:
- numericOrdering: (optional) If
True
, order numbers numerically instead of in collation order (defaults to False
).
- alternate: (optional) Specify whether spaces and punctuation are considered base characters. This must be one of the following values:
- maxVariable: (optional) When alternate isSHIFTED, this option specifies what characters may be ignored. This must be one of the following values:
- normalization: (optional) If
True
, normalizes text into Unicode NFD. Defaults to False
.
- backwards: (optional) If
True
, accents on characters are considered from the back of the word to the front, as it is done in some French dictionary ordering traditions. Defaults to False
.
- kwargs: (optional) Keyword arguments supplying any additional options to be sent with this Collation object.