Use of $regex from the shell

XMLWordPrintableJSON

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

      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
            Reporter:
            Gaetan Voyer-Perrault (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: