Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-16884

Regex/index optimization should allow "s" option

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • 2.6.7
    • Querying
    • None

    Description

      The optimization to determine index bounds from a regular expression, which works by checking whether the regex is left-anchored and contains a constant prefix, is not applied when the regex has any option other than "m" or "x" (see index_bounds_builder.cpp).

      There is no reason why the optimization shouldn't work for the option "s", which only changes the behavior of the . operator, and . can never be part of the constant prefix anyway.

      So the suggestion is to perform the optimization even when "s" is present, just as with "m" and "x".

      Attachments

        Activity

          People

            david.storch@mongodb.com David Storch
            andre.spiegel@mongodb.com Andre Spiegel
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: