Free Text Search
A Text Index is required for free text search. Here’s how to create one:
Such an index can be created on fields that are of type “string” or on array of strings.
Query example:
This query will look in the “cars” collection among created indexes for the “Ford” and “orange” (separately) terms. If the index was created on multiple fields, all of them will be searched.
Score
The returned results are scored. We can use that to decide which results are more relevant than others.
Each document wil contain a “score” field. The higher the score, the more relevant the result. We can sort the documents by score as well.