# What is the difference between function\_score and script\_score query?

**URL:** https://discuss.elastic.co/t/what-is-the-difference-between-function-score-and-script-score-query/191869
**Category:** Elasticsearch
**Created:** [July 23, 2019, 4:39pm UTC](https://discuss.elastic.co/t/what-is-the-difference-between-function-score-and-script-score-query/191869 "2019-07-23T16:39:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Borwick\_5576](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/borwick_5576/32/44759_2.png) [@Borwick\_5576](https://discuss.elastic.co/u/Borwick_5576)
#### Post date: [July 23, 2019, 4:39pm UTC](https://discuss.elastic.co/t/what-is-the-difference-between-function-score-and-script-score-query/191869/1 "2019-07-23T16:39:51Z")

</div>

Both modify the score of the retrieved docs, but when do I use each of them? Why would I also use _script\_score_ inside _function\_score_ instead of just sticking with _scripting\_score_?

---

<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: [August 20, 2019, 4:40pm UTC](https://discuss.elastic.co/t/what-is-the-difference-between-function-score-and-script-score-query/191869/2 "2019-08-20T16:40:01Z")

</div>

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