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

Use of $regex from the shell

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: JavaScript
    • None
    • ALL

      According to the issue below, the MongoDB supports queries like the following:

      db.docs.find( { "bar" :

      { $regex : /^a/, $nin : ['a1', 'a2' ] }

      } )

      http://jira.mongodb.org/browse/SERVER-275

      That feature has been around for a while, but it does not exist in the docs (Advanced Queries). It also does not have any unit tests wrapping it, so we should not doc it until we're protecting it via a test.

      Expected Fix:
      1. Add jstest for this behavior ( "x" : {$regex : /^a/} )
      2. Update the Advanced Queries document to clarify this behavior.

            Assignee:
            Unassigned Unassigned
            Reporter:
            gatesvp Gaetan Voyer-Perrault
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: