Hello
I'm using a 'tags' collection to store tags. I want to search the tags to make suggestions for auto complete.
I have already applied this through the command line:
use databasename
db.tags.ensureIndex( { tag: "text" } )
Then I'm using this in PHP:
$tags = Tags::find(
'$text' => array('$search' => $tag),
'score' => array('$meta' => 'textScore')
);
But the result contains all the tags, even those who are not related. Please advise.
Regards