[DOCS-10587] Document index types that do not support collation Created: 27/Jul/17  Updated: 30/Oct/23  Resolved: 13/May/19

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Critical - P2
Reporter: Tess Avitabile (Inactive) Assignee: Kay Kim (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Participants:
Days since reply: 4 years, 39 weeks, 2 days ago

 Description   

We should document that text indexes, btree version 0, 2d, and geo haystack do not support collation. I did not see this documented on the pages for createIndexes, text indexes, or collation. Apologies if I missed where this is documented.



 Comments   
Comment by Githook User [ 13/May/19 ]

Author:

{'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}

Message: DOCS-10587: mention index type restrictions on collations ref page
Branch: v3.6
https://github.com/mongodb/docs/commit/577c35c7f8f429c50fd55f4a5878bd7c30b91407

Comment by Githook User [ 13/May/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-10587: mention index type restrictions on collations ref page
Branch: v3.4
https://github.com/mongodb/docs/commit/fd2a05fac3643032b41a51ec5d4da50d3921d40f

Comment by Githook User [ 13/May/19 ]

Author:

{'name': 'Kay Kim', 'username': 'kay-kim', 'email': 'kay.kim@10gen.com'}

Message: DOCS-10587: mention index type restrictions on collations ref page
Branch: v4.0
https://github.com/mongodb/docs/commit/effae9ac404c127b0bfc6f0490274ee791f9a26d

Comment by Githook User [ 13/May/19 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'Kay Kim', 'username': 'kay-kim'}

Message: DOCS-10587: mention index type restrictions on collations ref page
Branch: master
https://github.com/mongodb/docs/commit/986fb89cd7342bbeabfae5b31374253b51694e55

Comment by Kay Kim (Inactive) [ 13/May/19 ]

Sure.

Comment by Dan Dascalescu [ 13/May/19 ]

Would it be possible to at https://docs.mongodb.com/manual/reference/collation/ that collations aren't supported for text indexes? I wasted a good amount of time attempting to create a compound index that included a 'text' field, on a collection is a default collation.

Comment by Githook User [ 07/Feb/18 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'kay', 'username': 'kay-kim'}

Message: DOCS-10587, DOCS-7089, DOCS-7652: highlight v3 of 2dsphere index, clarify sparse property and collation restriction for text/2d/geosphere indexes
Branch: v3.4
https://github.com/mongodb/docs/commit/51c100ae8bccaec0853737fd48526a61585e837b

Comment by Githook User [ 07/Feb/18 ]

Author:

{'email': 'kay.kim@10gen.com', 'name': 'kay', 'username': 'kay-kim'}

Message: DOCS-10587, DOCS-7089, DOCS-7652: highlight v3 of 2dsphere index, clarify sparse property and collation restriction for text/2d/geosphere indexes
Branch: master
https://github.com/mongodb/docs/commit/d9d0572bb9e09ee4bd4cdb6fd3b609ad33ba74d8

Comment by Ravind Kumar (Inactive) [ 27/Jul/17 ]

We could certainly make it more obvious on the other pages noted. Also would expand the documented note to include 2d / geohaystack indexes.

We also would want to specify that you can in fact use the collation option on text/2d/geohaystack indexes for the purpose of overriding the collection-level collation. Which is only required if there is a collection-level collation. But you can't specify anything other than ``locale : simple``. Need to test that though.

Comment by Asya Kamsky [ 27/Jul/17 ]

See https://docs.mongodb.com/manual/reference/method/db.collection.createIndex/#option-for-collation

First thing it says is "The collation option is available for all index types except for text indexes."

Comment by Tess Avitabile (Inactive) [ 27/Jul/17 ]

Yes, you can create an index of any type with {collation: {locale: "simple"}}.

Generated at Thu Feb 08 08:00:56 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.