Change score function to return number of matches of search term in the documents


I have gone through the default scoring function that elasticsearch uses.

score(q,d) = 
      * coord(q,d) 
      * SUM ( 
            tf(t in d), 
                    ) (t in q)

score(q,d) is the relevance score of document d for query q.
queryNorm(q) is the query normalization factor.
coord(q,d) is the coordination factor.
The sum of the weights for each term t in the query q for document d.
tf(t in d) is the term frequency for term t in document d.
idf(t) is the inverse document frequency for term t.
t.getBoost() is the boost that has been applied to the query.
norm(t,d) is the field-length norm, combined with the index-time field-level boost, if any.

I want to use Coordination factor alone as my score.

Any help here is highly appreciated.


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