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

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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: Server
    • Labels:
      None

      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.

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

              Created:
              Updated:
              Resolved:
              6 years, 30 weeks, 3 days ago