Scoring for string appearing multiple times in a field

In the movies collection, how can I ensure that a string I a searching “wife” is used only once for scoring although wife appears in the plot field multiple times.

Look at “indexOptions” for string fields: https://www.mongodb.com/docs/atlas/atlas-search/field-types/string-type/#std-label-bson-data-types-string

Using the “docs” option would achieve the stated goal by ignoring term frequency. Note that this of course has a relevancy affecting effect.

Thanks for your prompt response. It works!!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.