leodinas-hao / mongoose-query-parser

Convert url query string to MongooseJs friendly query object including advanced filtering, sorting, population, string template, type casting and many more...
MIT License
68 stars 17 forks source link

support of mongo $text index search #7

Open vaggeliskls opened 4 years ago

vaggeliskls commented 4 years ago

It would be a nice feature to enrich the mongoose query parser in order to support a search with the $text index of mongo. An example query: await Model.find( { $text : { $search : "text to look for" } }, { score : { $meta: "textScore" } } ) .sort({ score : { $meta : 'textScore' } }) Very nice work. Keep going. Thank you.