# Update "Living" values using update by query

**URL:** <https://discuss.elastic.co/t/update-living-values-using-update-by-query/281996>\
**Category:** Elasticsearch\
**Created:** [August 19, 2021, 5:18pm UTC](https://discuss.elastic.co/t/update-living-values-using-update-by-query/281996 "2021-08-19T17:18:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkward](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkward/32/95305_2.png) [@pkward](https://discuss.elastic.co/u/pkward)\
**Post date:** [August 19, 2021, 5:18pm UTC](https://discuss.elastic.co/t/update-living-values-using-update-by-query/281996/1 "2021-08-19T17:18:07Z")

</div>

Hi,

I'm attempting to create a "score" field that will hold a value that will change whenever the sum of other fields change, but I'm not sure if this is feasible with update-by-query. For example, if I wanted to create a gaming app that would update each time the player scores a point or has multiple field objects that plays into the "overall" score. I have a script processor that will calculate the score based on the field values that makes up the overall score, but I want the "score" field to be a moving score.

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 25, 2021, 9:56am UTC](https://discuss.elastic.co/t/update-living-values-using-update-by-query/281996/2 "2021-08-25T09:56:25Z")

</div>

I think the best way of doing this is as a processor on ingest time. Why doesn't it work and can you explain what a moving score is, that the ingest time processor cannot cover?

---

<div class="post-metadata">

**Author:** ![pkward](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkward/32/95305_2.png) [@pkward](https://discuss.elastic.co/u/pkward)\
**Post date:** [September 2, 2021, 2:22pm UTC](https://discuss.elastic.co/t/update-living-values-using-update-by-query/281996/3 "2021-09-02T14:22:08Z")

</div>

I configured the pipeline to just refresh itself by disabling sincedb.

---

<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:** [September 30, 2021, 2:22pm UTC](https://discuss.elastic.co/t/update-living-values-using-update-by-query/281996/4 "2021-09-30T14:22:17Z")

</div>

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