javascript - MongoChef Query IntelliShell versus QueryBuilder show different results -


the following query created , run query builder shows 10 result records. if run same code in intellishell don't receive anything? missing?

a more simple 1 again works.

db.user.find({        em: {          $regex: '.*\qdirk\e.*',          $options: 'i'       }  })

a more simplistic 1 works again. mongochef have issues $regex ...

db.user.find({em: "dirk@test.com"})

note you've hit upon special case here. use of \q ... \e requires regular expression given in slashes , not in single quotes. is, query must db.user.find({ em: { $regex: /.*\qdirk\e.*/, $options: 'i'}}) or db.user.find({ em: /.*\qdirk\e.*/i }).

be aware not problem in mongochef, mongodb shell requires slashes form used when \q , \e used in regular expression, , mongochef's intellishell based atop mongodb shell.

while collection view , query builder in mongochef happily process either form, query text produced graphical query builder in mongochef has been enhanced in upcoming 3.4.0 release produce slashes form, give consistent results if query copy , pasted intellishell or basic mongodb shell.

thanks using mongochef!


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -