# Get \_score of previous hit in script\_score

**URL:** <https://discuss.elastic.co/t/get-score-of-previous-hit-in-script-score/157066>\
**Category:** Elasticsearch\
**Created:** [November 16, 2018, 1:37pm UTC](https://discuss.elastic.co/t/get-score-of-previous-hit-in-script-score/157066 "2018-11-16T13:37:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atom/32/34758_2.png) [@atom](https://discuss.elastic.co/u/atom)\
**Post date:** [November 16, 2018, 1:37pm UTC](https://discuss.elastic.co/t/get-score-of-previous-hit-in-script-score/157066/1 "2018-11-16T13:37:01Z")

</div>

Hi,  
is it possible to get the \_score of a previous hit in script score?

---

<div class="post-metadata">

**Author:** ![rjernst](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rjernst/32/6363_2.png) [@rjernst](https://discuss.elastic.co/u/rjernst)\
**Post date:** [November 20, 2018, 12:20am UTC](https://discuss.elastic.co/t/get-score-of-previous-hit-in-script-score/157066/2 "2018-11-20T00:20:40Z")

</div>

No, this is not possible. Each document is scored completely independently, and the order of document iteration can change arbitrarily as documents move from one segment to another through merging.

---

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/atom/32/34758_2.png) [@atom](https://discuss.elastic.co/u/atom)\
**Post date:** [November 23, 2018, 10:29am UTC](https://discuss.elastic.co/t/get-score-of-previous-hit-in-script-score/157066/3 "2018-11-23T10:29:49Z")

</div>

thank you very much 🙂

---

<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:** [December 21, 2018, 10:29am UTC](https://discuss.elastic.co/t/get-score-of-previous-hit-in-script-score/157066/4 "2018-12-21T10:29:58Z")

</div>

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