top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Search using AND and OR using mongoDB query in Node Js?

+1 vote
539 views

I am using mongo db version 2.2.3 . I am having the requirement like user gives the input like "(ash|ben) & (Bus|car)" as search keywords. In this the & is for AND condition and | for the OR condition.
Is there any way to make this nested leywords as a mongodb query in node js. Is there any functionality in mongodb to achieve this?. If not how can make this in any other way?

posted Jul 17, 2015 by Rameshwar

Looking for an answer?  Promote on:
Facebook Share Button Twitter Share Button LinkedIn Share Button

Similar Questions
0 votes

Please advise if a NodeJS app should keep its historical data in a separate MongoDB databases instead of keeping them together with the application data?
For instance, 'transactions' collection and 'transactionhistories' collection, will it be better to store in different databases or single database for the same NodeJS app? Thanks!

+1 vote

I use nodejs with mongoDB and I want to insert JSON data into mongo, I use mongoose but I don't wanna to use model and shéma just push different json with different shéma.

Can someone tell me how I can do it ?

0 votes

As per my understanding MEAN (Mongodb,Express,Angular.js,Node.js) techstack is the recent buzz in the market for building Web Applications.

My confusion is, why only Mongodb suits the best when compared to other NoSql databases like (hbase, cassandra). If Mongodb is best suited, then why?

Also, can we use hive with angular.js and node.js ?. Can someone help me out with your best answers?

0 votes

is it possible to create views using the Node.js MongoDB Driver (3.0)? There is no db.createView() in the drivers API reference.

...