I am writing a script to fetch data from two fields but not working. Below is my code
$cursor = $collection->find(
array('$text' => array('$search' => 'रेजिमेंट')),
array('score' => array('$meta' => 'textScore'))
);
I checked some forum but not helping me.
How to query MongoDB with "like"? (this is not working and also this have only one field "name" while I required search with two fields.)
Where $text is the index set for two fields title and description.If anyone have idea please share me.