Skip Scoring more than once if search term appears multiple time in Document

Is it possible not to increase score if the search term appears in document more than once?
to implement similar to this ,which is implemented on db

            int rank = 100;
            var isMatched = false;
            if (!string.IsNullOrEmpty(field1) && field1.Contains(keyword))
                rank = 1;
                isMatched = true;
            else if (!string.IsNullOrEmpty(field2) && field2.Contains(keyword))
                rank = 10;
                isMatched = true;


You can copy the text data fields used for your search with copy_to and keep only one occurrence of each token by using the unique token filter

Phrase search won’t work on these fields.


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