# Cant create index after deleted them all

**URL:** <https://discuss.elastic.co/t/cant-create-index-after-deleted-them-all/216564>\
**Category:** Elasticsearch\
**Created:** [January 26, 2020, 11:25am UTC](https://discuss.elastic.co/t/cant-create-index-after-deleted-them-all/216564 "2020-01-26T11:25:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zilahir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zilahir/32/61442_2.png) [@zilahir](https://discuss.elastic.co/u/zilahir)\
**Post date:** [January 26, 2020, 11:25am UTC](https://discuss.elastic.co/t/cant-create-index-after-deleted-them-all/216564/1 "2020-01-26T11:25:58Z")

</div>

So, i have deleted all my indicies, using the endpoint:

```
DELETE <apiEndpoint>/*

```

after this, started to add data to Elasticsearch again, which are arriving there successfully.

In kibana, when i create index, it seems its gets created but then going to "Discover" page, it says:

> In order to viziualize and explore data in Kibana, you'll need to create an index pattern to retrieve data from Elasticsearch.

In the Dev Tools, executing the query:

```
GET _search
{
  "query": {
    "match_all": {}
  }
}

```

successfulkly returns my index, as well as the data.

How can I solve this problem? Been stuck here for days now, and finally i've decided to come here and ask, maybe someone could help me out.

Thank you,

---

<div class="post-metadata">

**Author:** ![zilahir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/zilahir/32/61442_2.png) [@zilahir](https://discuss.elastic.co/u/zilahir)\
**Post date:** [January 26, 2020, 11:27am UTC](https://discuss.elastic.co/t/cant-create-index-after-deleted-them-all/216564/2 "2020-01-26T11:27:49Z")

</div>

One additial info:

If i go to advanced settings, and set the `defaultIndex` to the id of the index, and save it, it does not get saved. Refreshing kibana and the value I just set is gone.

What is happening here?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [January 27, 2020, 9:58am UTC](https://discuss.elastic.co/t/cant-create-index-after-deleted-them-all/216564/3 "2020-01-27T09:58:29Z")

</div>

if you delete all your data, you also delete the kibana configuration data like index patterns. You need to recreate an index pattern in order to use kibana's discover/visualize tabs. You can go to 'Discover' and add an index pattern there.

In the future, you should probably not delete the .kibana index, unless you are really sure about that (this also deletes your visualizations and dashboards).

---

<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:** [February 24, 2020, 9:58am UTC](https://discuss.elastic.co/t/cant-create-index-after-deleted-them-all/216564/4 "2020-02-24T09:58:32Z")

</div>

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