[SERVER-24633] Support Turkish rules for case folding in $regex Created: 17/Jun/16  Updated: 06/Dec/22

Status: Backlog
Project: Core Server
Component/s: Text Search
Affects Version/s: None
Fix Version/s: None

Type: New Feature Priority: Major - P3
Reporter: Engin Kartal Assignee: Backlog - Query Optimization
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Participants:

 Description   
Original summary

Case Sensitivity Mistake – i-İ

Original Description

Example data:

{ "_id" : ObjectId("562395d2f4ac61190f8b463a"), "category_name" : "İçme Suları ve Kaynak Suları", "category_name_en" : "Water - Bottled & Bulk" }

db.categories.find({category_name:{ $regex: 'İçme', $options: 'i'}})
One result found. it is works well

However

When i swap capital İ with small i,i received no result.

db.categories.find({category_name:{ $regex: 'içme', $options: 'i'}})
no result.

The problem might be because of incompability of turkish characters .

King Regards ,



 Comments   
Comment by Orhan AYDOGDU [ 12/Jan/22 ]

Hi,

I have same problem.
MongoDB Version: 5.0.4

Kind Regards,

Orhan

Comment by Kelsey Schubert [ 21/Jun/16 ]

Hi admin@yellow.com.tr,

Thanks for reporting this behavior. As you correctly identified, this is the result of a difference in casing between English and Turkish languages:

Most Unicode software uppercases ı to I and lowercases İ to i, but, unless specifically set up for Turkish, it lowercases I to i and uppercases i to I. Thus uppercasing then lowercasing, or vice versa, changes the letters.

Since the current behavior is expected, I am modifying this ticket to be a feature request to support Turkish rules for case folding and marking this ticket to be considered during the next round of planning. Please continue to watch for updates.

Kind regards,
Thomas

Generated at Thu Feb 08 04:06:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.