# Calculate overall score of the query using score of each term

**URL:** <https://discuss.elastic.co/t/calculate-overall-score-of-the-query-using-score-of-each-term/198073>\
**Category:** Elasticsearch\
**Created:** [September 4, 2019, 4:06pm UTC](https://discuss.elastic.co/t/calculate-overall-score-of-the-query-using-score-of-each-term/198073 "2019-09-04T16:06:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nehacv](https://avatars.discourse-cdn.com/v4/letter/n/258eb7/32.png) [@nehacv](https://discuss.elastic.co/u/nehacv)\
**Post date:** [September 4, 2019, 4:06pm UTC](https://discuss.elastic.co/t/calculate-overall-score-of-the-query-using-score-of-each-term/198073/1 "2019-09-04T16:06:15Z")

</div>

I have a query which has 4-5 filters with each having score of its own filter A has score a and filter B has score b:  
{  
"boost\_factor": "3",  
"filter": {...}  
},  
{  
"filter": {â.},  
"script": "\_score \* doc['my\_numeric\_field'].value / pow(param1, param2)"  
}

I want to have a custom score of the overall query to be like 0.5_a + 0.7_b

How can I achieve this?

---

<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:** [October 2, 2019, 4:06pm UTC](https://discuss.elastic.co/t/calculate-overall-score-of-the-query-using-score-of-each-term/198073/2 "2019-10-02T16:06:16Z")

</div>

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