[DRIVERS-394] UTF substring case-insensetive match in aggregation pipeline Created: 15/Jul/17  Updated: 15/Jul/17  Resolved: 15/Jul/17

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Andrei Assignee: Unassigned
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

php on Windows



 Description   

Hello Sirs!
I'm new to MongoDB and I've just started to learn it, and possibly that my problem has already some solution. Here is my situation:
I'm working on search engine that accepts from user UTF-8 keywords and then searches for the matches in MongoDB collection, returning documents that match. For matching part I could use regex, but the problem is that besides search keywords, user also provides logical expressions in order to narrow the search. So I need to use aggregation pipeline. But the aggregation doesn't provide (as well as I know) means to match against case-insensitive utf-8 substring. For example:
Search keyword is: "jõhvi"
Collection contains such array cells:
"address": "Rahu 26, Jõhvi", "comment": "JÕHVI is a nice city".
So how could be matched keyword Jõhvi against "comment" field, containing same word but in different case in $project of aggregation pipeline? I can use $indexOF in combination with $toLower, but $toLower doesn't handle UTF-8 letters . Please help!



 Comments   
Comment by Rathi Gnanasekaran [ 15/Jul/17 ]

andruss2001 This is not a driver related question. Please email the mongodb users group for swift response : mongodb-user@googlegroups.com

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