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

Regexes should not try to match against numbers or dates

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.3
    • Affects Version/s: None
    • Component/s: Querying
    • None
    • Minor Change

      Right now we convert them to strings, but only if we aren't using an index.

      > db.c.drop()
      true
      > db.c.insert(

      {a:1}

      )
      ObjectId("4b85978ee567afca16af984e")
      > db.c.find(

      {a:/^1/}

      )

      { "_id" : ObjectId("4b85978ee567afca16af984e"), "a" : 1 }

      > db.c.ensureIndex(

      {a:1}

      )
      > db.c.find(

      {a:/^1/}

      )
      >

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            mathias@mongodb.com Mathias Stearn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: