Chapter 2 - Collations Quiz

Why is this answer not a correct choice for this quiz? I don’t follow.

“Creating an index with a different collation from the base collection implies overriding the base collection collation.”

See the closed topic Chapter 2 - Collations Quiz

Hum…
The question is related to creating an index, not using it.
In addition, the transcript says “This way, we can create an index or name that overrides the default collation or any collection level defined collations.”

Regards,

It is not a correct choice since creating an index with a different collation from the base collection DOES NOT imply overriding the base collection collation. The base collection keeps its collation. It is the index that has a different collation. You may find the following link interesting
https://docs.mongodb.com/manual/reference/collation/

1 Like

Overriding is not changing.
Thanks for the clarification and for the link.

hi Antoine_Gemis_13111
I have same confused about “Chapter 2: MongoDB Indexes Collations Quiz”
clearly, the transcript says "That is totally possible, and we can even specify different collations for our indexes.This way, we can create an index or name that overrides the default collation or any collection level defined collations.(running time :01:56 ~ 2:11) "

Do you think transcript is not correct? :slight_smile:

Hi euimok_10578,

Yes, I think that transcript is correct.
My understanding is that "Creating an index with a different collation from the base collection implies overriding the base collection collation, when using it.
when using it is not part of the question, but generally, you’re creating an index to use it :wink:)

However, “to use an index for string comparisons, an operation must also specify the same collation. That is, an index with a collation cannot support an operation that performs string comparisons on the indexed fields if the operation specifies a different collation”.

https://docs.mongodb.com/manual/reference/command/createIndexes/#dbcmd.createIndexes

Regards,

1 Like