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

index ranges for overlapping prefix regular expressions in a $in clause

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.1.0
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • ALL

      In some cases overlapping ranges of prefix regular expressions in a $in clause are not computed correctly:

      > c.find( {x:{$in:[/^a/,/^ab/]}} ).explain()
      {
      "cursor" : "BtreeCursor x_1 multi",
      "nscanned" : 0,
      "nscannedObjects" : 0,
      "n" : 0,
      "millis" : 1,
      "nYields" : 0,
      "nChunkSkips" : 0,
      "isMultiKey" : false,
      "indexOnly" : false,
      "indexBounds" :

      { "x" : [ [ "a", "ac" ], [ /^a/, /^a/ ], [ /^ab/, /^ab/ ] ] }

      ,
      "server" : "Aaron-Staples-MacBook-Pro.local:27017"
      }

            Assignee:
            aaron Aaron Staple
            Reporter:
            aaron Aaron Staple
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: