Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-9933

Explain that regex is unable to take advantage of indexes that use collation

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • None
    • Server
    • None

    Description

      With the release of 3.4 we introduced collations. Among other benefits, that allows MongoDB users to create case-insensitive indexes.

      Some of these users (not unreasonably) expect that $regex case insensitive queries should be able take advantage of such indexes. Unfortunately that is not the case - the regex implementation is not collation-aware and is unable to utilize case-insensitive indexes.

      We should have this explained somewhere in the documentation about $regex index use.

      Attachments

        Activity

          People

            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            dmitry.ryabtsev@mongodb.com Dmitry Ryabtsev
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              6 years, 17 weeks, 1 day ago