Is it possible to give fix score for specific field search

Is it possible to give fix score based on every field match. for e.g one field matched then increment score for document by 1 , second field matched then increment document score by 1, so if there are one fields matched the score would be 1 if two fields matched then score would be 2 and so on...

You could wrap each of the queries on each of the fields in a constant_score query. If a query clause matches, the score for that clause will be 1 (or whichever boost you provide), if not the score will be 0.

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