# Update indexed data based on a value from a new record still does not indexed

**URL:** <https://discuss.elastic.co/t/update-indexed-data-based-on-a-value-from-a-new-record-still-does-not-indexed/250429>\
**Category:** Elasticsearch\
**Created:** [September 30, 2020, 1:22am UTC](https://discuss.elastic.co/t/update-indexed-data-based-on-a-value-from-a-new-record-still-does-not-indexed/250429 "2020-09-30T01:22:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marcelo\_Lavor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcelo_lavor/32/76414_2.png) [@Marcelo\_Lavor](https://discuss.elastic.co/u/Marcelo_Lavor)\
**Post date:** [September 30, 2020, 1:22am UTC](https://discuss.elastic.co/t/update-indexed-data-based-on-a-value-from-a-new-record-still-does-not-indexed/250429/1 "2020-09-30T01:22:05Z")

</div>

Hello! I need to update a field of several records already indexed based on a value from a new record still not indexed? Is there any way to implement it?

Thanks

Marcelo

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 30, 2020, 6:47am UTC](https://discuss.elastic.co/t/update-indexed-data-based-on-a-value-from-a-new-record-still-does-not-indexed/250429/2 "2020-09-30T06:47:22Z")

</div>

Have you looked into using the [update by query API](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-update-by-query.html)?

---

<div class="post-metadata">

**Author:** ![Marcelo\_Lavor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marcelo_lavor/32/76414_2.png) [@Marcelo\_Lavor](https://discuss.elastic.co/u/Marcelo_Lavor)\
**Post date:** [September 30, 2020, 9:34am UTC](https://discuss.elastic.co/t/update-indexed-data-based-on-a-value-from-a-new-record-still-does-not-indexed/250429/3 "2020-09-30T09:34:08Z")

</div>

Hi Christian, thank you for the reply. I went there, but honestly, I had not clue to solve this scenario.

This table below describes my index with current docs. The yellow line would be a new doc arriving.

RULE: As far the latest entry is received (NEW "not indexed entry") with STATE=OFF, all respective entries of Group 1 (FROM EXISTING INDEX) must be set COLOR=RED

![image](https://us1.discourse-cdn.com/elastic/original/3X/b/0/b0a4ac4acb274873e6f144aa832bafca8ec70c4f.png)

Could you please let me know any example how to implement?

---

<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:** [October 28, 2020, 9:34am UTC](https://discuss.elastic.co/t/update-indexed-data-based-on-a-value-from-a-new-record-still-does-not-indexed/250429/4 "2020-10-28T09:34:10Z")

</div>

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