# If we modify field in index today can we get that field data in same format for the old data also?

**URL:** <https://discuss.elastic.co/t/if-we-modify-field-in-index-today-can-we-get-that-field-data-in-same-format-for-the-old-data-also/354224>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [February 27, 2024, 12:05pm UTC](https://discuss.elastic.co/t/if-we-modify-field-in-index-today-can-we-get-that-field-data-in-same-format-for-the-old-data-also/354224 "2024-02-27T12:05:07Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![2328943\_dc](https://avatars.discourse-cdn.com/v4/letter/2/a9adbd/32.png) [@2328943\_dc](https://discuss.elastic.co/u/2328943_dc)\
**Post date:** [February 27, 2024, 12:05pm UTC](https://discuss.elastic.co/t/if-we-modify-field-in-index-today-can-we-get-that-field-data-in-same-format-for-the-old-data-also/354224/1 "2024-02-27T12:05:07Z")

</div>

If we made changes in field by modifying index code today ,can we get old data in new modified field format ??

[EX: We are getting 24-FEB-2024 this data in only one field i.e timestamp  
but we want to display date/month/year in different fields and made changes in the code accordingly.  
So this changes will reflect for old data also or only for upcoming data ?

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [February 27, 2024, 1:10pm UTC](https://discuss.elastic.co/t/if-we-modify-field-in-index-today-can-we-get-that-field-data-in-same-format-for-the-old-data-also/354224/2 "2024-02-27T13:10:46Z")

</div>

Hey there @2328943_dc - you'd have to reindex your older data to get the new values in the new fields. Hope that helps!

---

<div class="post-metadata">

**Author:** ![2328943\_dc](https://avatars.discourse-cdn.com/v4/letter/2/a9adbd/32.png) [@2328943\_dc](https://discuss.elastic.co/u/2328943_dc)\
**Post date:** [March 3, 2024, 3:40am UTC](https://discuss.elastic.co/t/if-we-modify-field-in-index-today-can-we-get-that-field-data-in-same-format-for-the-old-data-also/354224/3 "2024-03-03T03:40:37Z")

</div>

could you please provide any document for it.

We tried below solution but its not working .

> **[Elasticsearch Reindex - Reindex API, Examples & More](https://opster.com/guides/elasticsearch/glossary/elasticsearch-reindex/)**
>
> Reindex in Elasticsearch refers to copying existing data from a source index to a destination index. In some scenarios, the reindex API is...

---

<div class="post-metadata">

**Author:** ![Kathleen\_DeRusso](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kathleen_derusso/32/132039_2.png) [@Kathleen\_DeRusso](https://discuss.elastic.co/u/Kathleen_DeRusso)\
**Post date:** [March 4, 2024, 4:24pm UTC](https://discuss.elastic.co/t/if-we-modify-field-in-index-today-can-we-get-that-field-data-in-same-format-for-the-old-data-also/354224/4 "2024-03-04T16:24:54Z")

</div>

Here are the documentats on the [reindex api](https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html). Hope that helps.

---

<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:** [April 1, 2024, 4:25pm UTC](https://discuss.elastic.co/t/if-we-modify-field-in-index-today-can-we-get-that-field-data-in-same-format-for-the-old-data-also/354224/5 "2024-04-01T16:25:23Z")

</div>

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