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

Use of $regex from the shell

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • JavaScript
    • None
    • ALL

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: