Uploaded image for project: 'Drivers'
  1. Drivers
  2. DRIVERS-394

UTF substring case-insensetive match in aggregation pipeline

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • 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!

      Attachments

        Activity

          People

            Unassigned Unassigned
            andruss2001 Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: