-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Querying
-
Labels:None
I created a collection explicitly in MongoDB 3.4 in order to define the collation:
db.createCollection("mycoll", {collation: { "locale": "en_US", "strength": 1, "caseLevel": false, "numericOrdering": false, "maxVariable": "punct", "caseFirst": "off", "alternate": "non-ignorable", "normalization": false, "backwards": false }})
Now I want to check the collation associated with that collection but I can't find a command to show that information. I tested the following commands:
db.mycoll.stats()
db.runCommand({collStats: "mycoll"})
After reviewing all the output from the last command I found the collation under the indexDetails section inside _id index but it's the index collation not the collection collation. Take in account that if collection was created with autoIndexId=false then indexDetails is missed. I also test the collection using MongoDB Compass but I can't find the collation either so:
How to know the collation of a specific collection?
Thanks