# Using \_score in custom filters score query

**URL:** <https://discuss.elastic.co/t/using--score-in-custom-filters-score-query/12577>\
**Category:** Elasticsearch\
**Created:** [June 28, 2013, 9:01am UTC](https://discuss.elastic.co/t/using--score-in-custom-filters-score-query/12577 "2013-06-28T09:01:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![aditya\_pasumarthi](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@aditya\_pasumarthi](https://discuss.elastic.co/u/aditya_pasumarthi)\
**Post date:** [June 28, 2013, 9:01am UTC](https://discuss.elastic.co/t/using--score-in-custom-filters-score-query/12577/1 "2013-06-28T09:01:17Z")

</div>

I want to use filters in my search, each one with a query that results in a  
score. I then want to use score\_mode 'total' to combine the filter scores.

I do want to control the scores of each filter (and query within it), but  
using the original score of the query inside a filter. I want the script of  
the filter to be something like Script("\_score \* 50/100").

This way I can set the weightage of each filter in the overall search score.

However using \_score in the filter script of a custom\_filters\_score is not  
allowed. How can I get the original score of a filter (and its inner query)  
computed by ElasticSearch, which I can use as base for my custom score for  
a filter?

Any help is greatly appreciated.

Thanks & Regards,  
Aditya.

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:** [July 6, 2017, 2:29am UTC](https://discuss.elastic.co/t/using--score-in-custom-filters-score-query/12577/2 "2017-07-06T02:29:05Z")

</div>


