node-sqlagent icon indicating copy to clipboard operation
node-sqlagent copied to clipboard

$text operator

Open dacrhu opened this issue 8 years ago • 2 comments

Hi,

can you provide the $text operator to MongoDB find method? That would be useful to text search.

Reference: https://docs.mongodb.com/manual/text-search/

Thank you, David

dacrhu avatar Jul 27 '18 16:07 dacrhu

Hi, i can't test it right now, but doesn't the bellow code work already?

builder.where('$text', { $search: "some text" });

Note that it requires text index on the queried collection.

molda avatar Jul 27 '18 17:07 molda

Thank you, working fine!

dacrhu avatar Jul 27 '18 18:07 dacrhu