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

Clarify how case sensitivity affects a prefix regex

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • manual, Server

    Description

      The page describes a prefix expression and separately explains a case-insensitive match but does not explain how the latter affects the former.

      I think the prefix expression explanation should also state that using a case insensitive match will prevent a prefix expression from being optimized. A full index scan results in this case not one bounded by the prefix.

      Separately it seems MongoDB could optimize the case-insensitive search for a prefix expression by simply restricting the search to two ranges: one starting with a lower-cased initial character and the other starting with an upper-cased initial character from the prefix. That would, on average be 26x faster than what happens today.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ianmercer Ian Mercer
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              1 year, 14 weeks, 1 day ago