# How to modify scores in SearchResponse object?

**URL:** https://discuss.elastic.co/t/how-to-modify-scores-in-searchresponse-object/41665
**Category:** Elasticsearch
**Created:** [February 12, 2016, 10:20pm UTC](https://discuss.elastic.co/t/how-to-modify-scores-in-searchresponse-object/41665 "2016-02-12T22:20:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rahulcse](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rahulcse/32/12158_2.png) [@rahulcse](https://discuss.elastic.co/u/rahulcse)
#### Post date: [February 12, 2016, 10:20pm UTC](https://discuss.elastic.co/t/how-to-modify-scores-in-searchresponse-object/41665/1 "2016-02-12T22:20:17Z")

</div>

I am trying to implement a social feature, and I would need to modify the scores in SearchResponse (SearchHit) object based on external signals.

Please let me know how can this be done.

Thanks in advance.

Regards,  
Rahul

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [February 13, 2016, 7:20am UTC](https://discuss.elastic.co/t/how-to-modify-scores-in-searchresponse-object/41665/2 "2016-02-13T07:20:34Z")

</div>

If the data which will modify the score is part of your document, then you can use function\_score to do it.

If you have an external system, then I think you need to write a script as a Java plugin and call it from function\_score.

Calling an external system will dramatically slowdown your system though. Might not be the best solution here.

---

<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 5, 2017, 11:16pm UTC](https://discuss.elastic.co/t/how-to-modify-scores-in-searchresponse-object/41665/3 "2017-07-05T23:16:39Z")

</div>


