# Error in visualize when delete and recreate the same index

**URL:** <https://discuss.elastic.co/t/error-in-visualize-when-delete-and-recreate-the-same-index/184111>\
**Category:** Kibana\
**Created:** [June 4, 2019, 8:19am UTC](https://discuss.elastic.co/t/error-in-visualize-when-delete-and-recreate-the-same-index/184111 "2019-06-04T08:19:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elk2](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@elk2](https://discuss.elastic.co/u/elk2)\
**Post date:** [June 4, 2019, 8:19am UTC](https://discuss.elastic.co/t/error-in-visualize-when-delete-and-recreate-the-same-index/184111/1 "2019-06-04T08:19:42Z")

</div>

I deleted and recreate for error the same index pattern and now all visualize have an error. I seen that the index pattern save a unique ID. There is a mean to avoid this issue or I have to recreate all visualize?

---

<div class="post-metadata">

**Author:** ![jen-huang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jen-huang/32/74327_2.png) [@jen-huang](https://discuss.elastic.co/u/jen-huang)\
**Post date:** [June 4, 2019, 5:51pm UTC](https://discuss.elastic.co/t/error-in-visualize-when-delete-and-recreate-the-same-index/184111/2 "2019-06-04T17:51:56Z")

</div>

If you know the old index pattern ID (aka the one your visualizations are currently using), you can specify the same ID when you recreate the index pattern:

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

Otherwise you can export all your visualizations, do a find+replace of the ID in the exported JSON, and re-import them.

---

<div class="post-metadata">

**Author:** ![elk2](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@elk2](https://discuss.elastic.co/u/elk2)\
**Post date:** [June 6, 2019, 3:28pm UTC](https://discuss.elastic.co/t/error-in-visualize-when-delete-and-recreate-the-same-index/184111/3 "2019-06-06T15:28:16Z")

</div>

Thanks Jen !

---

<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:** [July 4, 2019, 3:28pm UTC](https://discuss.elastic.co/t/error-in-visualize-when-delete-and-recreate-the-same-index/184111/4 "2019-07-04T15:28:25Z")

</div>

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