You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to node-mongodb-native
Hi guys
When I'm querying my mongodb using regular expressions - literal
constructors work fine i.e.
find({n:/rick/i})
returns anything with n: that contains "rick"
However, since I'm writing a search query I do not know the string I
want to pass until runtime - so I tried using the following:
var searchString = "rick"
find({n:new RegExp(searchString, "i")})
I dont get any results - but from the mongodb shell it works!
Any ideas?
Christian Kvalheim
unread,
Aug 12, 2010, 12:10:14 PM8/12/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to node-mong...@googlegroups.com
Are you running higher than 1.4 ?
There's a change in regexp in 1.5 -> that breaks it with the current driver. I have not had any time to look at how to resolve it. If you can figure it out or someone else has time to look at it please help out.
Cheers
Christian
rick....@gmail.com
unread,
Aug 12, 2010, 12:19:03 PM8/12/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to node-mong...@googlegroups.com
1.4 actually!
Christian Kvalheim
unread,
Aug 12, 2010, 12:26:58 PM8/12/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to node-mong...@googlegroups.com
so it's probably a parser error when doing
toString on the regexp to transform it to bson
Please see if you can provide a failing test in integration_tests.js and give me a push on github
Cheers
rick....@gmail.com
unread,
Aug 12, 2010, 12:38:01 PM8/12/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message