@ -1731,7 +1731,7 @@ A query searching for `coffee cake` can be defined and run as follows:
@@ -1731,7 +1731,7 @@ A query searching for `coffee cake` can be defined and run as follows:
@ -1744,7 +1744,7 @@ To sort results by relevance according to the `weights` use `TextQuery.sortBySco
@@ -1744,7 +1744,7 @@ To sort results by relevance according to the `weights` use `TextQuery.sortBySco
@ -1759,8 +1759,8 @@ You can exclude search terms by prefixing the term with `-` or by using `notMatc
@@ -1759,8 +1759,8 @@ You can exclude search terms by prefixing the term with `-` or by using `notMatc
`TextCriteria.matching` takes the provided term as is. Therefore, you can define phrases by putting them between double quotation marks (for example, `\"coffee cake\")` or using by `TextCriteria.phrase.` The following example shows both ways of defining a phrase:
You can set flags for `$caseSensitive` and `$diacriticSensitive` by using the corresponding methods on `TextCriteria`. Note that these two optional flags have been introduced in MongoDB 3.2 and are not included in the query unless explicitly set.