Skip to content

fullTextSearch

fullTextSearch(): TranslationLibrary<MongoDbTranslation>

Returns the MongoDB binding of the full-text search library.

The library adds index.matchesText(query), which selects a document whose indexed terms contain every query term. Each term becomes a $text phrase, because MongoDB combines unquoted terms with a logical OR. MongoDB evaluates $text only where a conjunction reaches it, so the binding rejects a negated or disjunctive position instead of emitting a query that MongoDB refuses.

TranslationLibrary<MongoDbTranslation>