Although, I agree with the answer here that “mongodb will throw an error”. But this is purely because the syntax of db.signs.find() that is used to specify the collation for the search is incorrect.
That explanation doesn’t sound right. My understanding is that we can always fire queries with one collation, when the collection is created with a different collation.
Can somebody from MongoDB University address this please?
Furthermore, the study guide specifies that you guys are not testing test-takers on the syntax. So if we were to ignore the syntax issue in the question, then the correct answer should have been "matching the documents using the locale “en” "
Further to my above post, following should prove that we can fire queries with one collation, while the collection is created with a different collation.
I have created a signs collection with collation of locale: fr and have created an index on it with collation of locale : es as shown below:
Below, I am able to find documents with collation having locale : en (which is neither the collation at collection level, nor the collation at the index level)
Thank you so much for your analysis and detailed description. You were right, the answer or detailed description is incorrect and we are working on the same.