# Is it possible to give fix score for specific field search

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-give-fix-score-for-specific-field-search/130559>\
**Category:** Elasticsearch\
**Created:** [May 4, 2018, 5:07am UTC](https://discuss.elastic.co/t/is-it-possible-to-give-fix-score-for-specific-field-search/130559 "2018-05-04T05:07:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![karanlevaral](https://avatars.discourse-cdn.com/v4/letter/k/a88e57/32.png) [@karanlevaral](https://discuss.elastic.co/u/karanlevaral)\
**Post date:** [May 4, 2018, 5:07am UTC](https://discuss.elastic.co/t/is-it-possible-to-give-fix-score-for-specific-field-search/130559/1 "2018-05-04T05:07:03Z")

</div>

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...

---

<div class="post-metadata">

**Author:** ![abdon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abdon/32/9195_2.png) [@abdon](https://discuss.elastic.co/u/abdon)\
**Post date:** [May 6, 2018, 2:49pm UTC](https://discuss.elastic.co/t/is-it-possible-to-give-fix-score-for-specific-field-search/130559/2 "2018-05-06T14:49:55Z")

</div>

You could wrap each of the queries on each of the fields in a [`constant_score query`](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-constant-score-query.html). 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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 3, 2018, 2:49pm UTC](https://discuss.elastic.co/t/is-it-possible-to-give-fix-score-for-specific-field-search/130559/3 "2018-06-03T14:49:57Z")

</div>

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