Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose search by keywords

var result = db.collection('AdSchema').find({
    $or: [ {vehicleDescription : { $regex: search.keyWord, $options: 'i' }}, { adDescription: { $regex: search.keyWord, $options: 'i' } } ]
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongoose #search #keywords
ADD COMMENT
Topic
Name
4+4 =