[SERVER-2496] Use of $regex from the shell Created: 09/Feb/11  Updated: 17/Mar/11  Resolved: 09/Feb/11

Status: Closed
Project: Core Server
Component/s: JavaScript
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Gaetan Voyer-Perrault Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 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.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 09/Feb/11 ]

For tests see:
run:
git grep '$regex' jstests/

for doc updates, please open a ticket in the "Website" project

Generated at Thu Feb 08 03:00:09 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.