# How to "recreate" events from an index by just changing time?

**URL:** <https://discuss.elastic.co/t/how-to-recreate-events-from-an-index-by-just-changing-time/254761>\
**Category:** Elasticsearch\
**Created:** [November 9, 2020, 1:08pm UTC](https://discuss.elastic.co/t/how-to-recreate-events-from-an-index-by-just-changing-time/254761 "2020-11-09T13:08:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kelk](https://avatars.discourse-cdn.com/v4/letter/k/13edae/32.png) [@kelk](https://discuss.elastic.co/u/kelk)\
**Post date:** [November 9, 2020, 1:08pm UTC](https://discuss.elastic.co/t/how-to-recreate-events-from-an-index-by-just-changing-time/254761/1 "2020-11-09T13:08:19Z")

</div>

hi  
We have some "enriched" events in an index from last month for a customer product checkout. The enrichment has happened in "elastic beats" && "logstash" and not entirely in my control. So I cannot simulate the \_raw events again.

The only option left is to re-index a "set of events" in order, but just change the "timestamp" of the sequence on the fly. Is there a tool/idea to

- Get specific data from index
- reindex these events to another test-index but with "similar timestamp" for today

Eg of what I'm looking for is

- Using [https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html) (re-index api)
- But ability to transform/change the logs with certain logic (or pass it back to logstash)

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 9, 2020, 10:06pm UTC](https://discuss.elastic.co/t/how-to-recreate-events-from-an-index-by-just-changing-time/254761/2 "2020-11-09T22:06:21Z")

</div>

You could use [reindex with an ingest pipeline](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-reindex.html#docs-reindex-routing) (scroll down a little bit with this link, it's under the routing t4ext) to do the processing, or use a [painless script](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/docs-reindex.html#reindex-scripts).

---

<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 7, 2020, 10:06pm UTC](https://discuss.elastic.co/t/how-to-recreate-events-from-an-index-by-just-changing-time/254761/3 "2020-12-07T22:06:23Z")

</div>

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