# Changing the value of log entry in old index

**URL:** <https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835>\
**Category:** Elasticsearch\
**Created:** [November 14, 2019, 8:37am UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835 "2019-11-14T08:37:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seetharaman\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seetharaman_k/32/52542_2.png) [@Seetharaman\_K](https://discuss.elastic.co/u/Seetharaman_K)\
**Post date:** [November 14, 2019, 8:37am UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835/1 "2019-11-14T08:37:44Z")

</div>

Hi All ,  
i have an artifact which is sending logs in elastic for about 5 months. (every month one index) . now all of a sudden business is saying one of the values in the old logs is wrong. say eg: the log field name is "average time " . now there is a work around , i can create scripted field and hide this old feild in my kibana visualization . now my scripted field will have the new value .  
but i am looking a way where i can change the old value and kind of do some re-index thing . so that no scripted feild is involved. all index sizes are of few MBs in my case. more than 400 doc in every index.  
any idea how to do it ?

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [November 14, 2019, 11:01pm UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835/2 "2019-11-14T23:01:17Z")

</div>

Hello,

You can use the [Reindex API](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html). As you can see, that includes the ability to provide a script for updating the documents. An alternative to providing the script would be to set up an [ingest pipeline](https://www.elastic.co/guide/en/elasticsearch/reference/current/pipeline.html) configured with the [rename processor](https://www.elastic.co/guide/en/elasticsearch/reference/current/rename-processor.html).

---

<div class="post-metadata">

**Author:** ![Seetharaman\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seetharaman_k/32/52542_2.png) [@Seetharaman\_K](https://discuss.elastic.co/u/Seetharaman_K)\
**Post date:** [November 15, 2019, 2:53am UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835/3 "2019-11-15T02:53:13Z")

</div>

I hope this suggestion is to change the field value of any of the individual log entry inside all the document. (Which are pertaining to old index ) against the option of creating a log field new entry.  
Thank you for the suggestion. I will get back in couple of days to close this thread.meanwhile any more suggestions u wanna give pls welcome 😊

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [November 15, 2019, 4:04am UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835/4 "2019-11-15T04:04:28Z")

</div>

Oh, I see, you want to fix the value in the original field. You can use the [script processor](https://www.elastic.co/guide/en/elasticsearch/reference/current/script-processor.html).

---

<div class="post-metadata">

**Author:** ![Seetharaman\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seetharaman_k/32/52542_2.png) [@Seetharaman\_K](https://discuss.elastic.co/u/Seetharaman_K)\
**Post date:** [November 15, 2019, 7:18am UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835/5 "2019-11-15T07:18:22Z")

</div>

ah scripted field !! no , no scripted field. i have already scripted field.

---

<div class="post-metadata">

**Author:** ![Glen\_Smith](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/glen_smith/32/111656_2.png) [@Glen\_Smith](https://discuss.elastic.co/u/Glen_Smith)\
**Post date:** [November 15, 2019, 2:47pm UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835/6 "2019-11-15T14:47:35Z")

</div>

Not scripted field, script processor in the ingest pipeline when you reindex.

---

<div class="post-metadata">

**Author:** ![Seetharaman\_K](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seetharaman_k/32/52542_2.png) [@Seetharaman\_K](https://discuss.elastic.co/u/Seetharaman_K)\
**Post date:** [November 19, 2019, 5:10am UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835/7 "2019-11-19T05:10:53Z")

</div>

still not tested , please give me some more time to test and close this thread.

---

<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 17, 2019, 5:10am UTC](https://discuss.elastic.co/t/changing-the-value-of-log-entry-in-old-index/207835/8 "2019-12-17T05:10:56Z")

</div>

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