This page explains how to specify a default collation for a view.Documentation Index
Fetch the complete documentation index at: https://mongodb-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Example
Create aplaces collection with the following documents:
3.
Collation behavior:
- You can specify a default collation for a view at creation time. If no collation is specified, the view’s default collation is the “simple” binary comparison collator. That is, the view does not inherit the collection’s default collation.
- String comparisons on the view use the view’s default collation. An operation that attempts to change or override a view’s default collation will fail with an error.
- If creating a view from another view, you cannot specify a collation that differs from the source view’s collation.
-
If performing an aggregation that involves multiple views, such as with
$lookupor$graphLookup, the views must have the same collation.