[SERVER-28472] How to know the collation of a collection Created: 24/Mar/17 Updated: 06/Feb/18 Resolved: 24/Mar/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Kindox | Assignee: | Ramon Fernandez Marina |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
I created a collection explicitly in MongoDB 3.4 in order to define the collation:
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:
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 |
| Comments |
| Comment by Kindox [ 24/Mar/17 ] | ||||||||||||||||||||||||||||||||||||||||||||
|
Awesome! Thanks! | ||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ramon Fernandez Marina [ 24/Mar/17 ] | ||||||||||||||||||||||||||||||||||||||||||||
|
kindox, since Dan answered your question I'm going to close this ticket. Please note that the SERVER project is for reporting bugs or feature suggestions for the MongoDB server. For MongoDB-related support discussion please post on the mongodb-user group or Stack Overflow with the mongodb tag, where your question will reach a larger audience. A question like this involving more discussion would be best posted on the mongodb-user group. See also our Technical Support page for additional support resources. Regards, | ||||||||||||||||||||||||||||||||||||||||||||
| Comment by Daniel Pasette (Inactive) [ 24/Mar/17 ] | ||||||||||||||||||||||||||||||||||||||||||||
|
you can get the collection information via the shell using the db.getCollectionInfos helper which is calling the listCollections command under the hood.
|