# How to query elasticsearch: I keep getting index\_not\_found\_exception

**URL:** <https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750>\
**Category:** Elasticsearch\
**Created:** [November 14, 2018, 10:19pm UTC](https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750 "2018-11-14T22:19:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Ramierez](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jose\_Ramierez](https://discuss.elastic.co/u/Jose_Ramierez)\
**Post date:** [November 14, 2018, 10:19pm UTC](https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750/1 "2018-11-14T22:19:13Z")

</div>

Elasticsearch 6.4.3

**Issue** : /\_search command returns:

`index_not_found_exception`

Specifically:

```
$ curl -X GET "192.168.2.2:9200/MyNew_Index/_search" -H 'Content-Type: application/json'
{
"from": 0,
"size": 40,
"sort":
...

```

Returns:

```
{
    "error": {
        "root_cause": [{
            "type": "index_not_found_exception",
            "reason": "no such index",
            "resource.type": "index_or_alias",
            "resource.id": "MyNew_Index",
            "index_uuid": "_na_",
            "index": "MyNew_Index"
        }],
...

```

But when I look to see what indexes are present, I see it:

```
$ curl -X GET "192.168.2.2:9200/_cat/indices?v" -H 'Content-Type: application/json'
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open MyNew_Index 71X8IOLzQaKqj7aaK5CRbA 50 1 900288822
3322978 1tb 533.4gb

```

What am I missing?

---

<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 14, 2018, 11:06pm UTC](https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750/2 "2018-11-14T23:06:56Z")

</div>

What does `_cat/indices/MyNew_index?v` show?

---

<div class="post-metadata">

**Author:** ![Jose\_Ramierez](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jose\_Ramierez](https://discuss.elastic.co/u/Jose_Ramierez)\
**Post date:** [November 15, 2018, 12:21am UTC](https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750/3 "2018-11-15T00:21:52Z")

</div>

> [@warkolm](#):
>
> /

```
curl -X GET "192.168.2.2:9200/_cat/indices/MyNew_index?v" -H 'Content-Type: application/json'

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size
green open MyNew_index 71X8IOLzQaKqj7aaK5CRbA 50 1 901322309
3449192 1tb 534.7gb

```

---

<div class="post-metadata">

**Author:** ![Jose\_Ramierez](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jose\_Ramierez](https://discuss.elastic.co/u/Jose_Ramierez)\
**Post date:** [November 15, 2018, 12:41am UTC](https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750/4 "2018-11-15T00:41:39Z")

</div>

Is it possible that certain index names are problematic?

What about an index name of: `2018_v2_NEW_CLUSTER_Case_61123`

---

<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 15, 2018, 1:27am UTC](https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750/5 "2018-11-15T01:27:04Z")

</div>

> [@Jose\_Ramierez](#):
>
> Is it possible that certain index names are problematic?

I've seen it on a few occasions in the past but it's super rare and usually extremely hard to cause.

---

<div class="post-metadata">

**Author:** ![Jose\_Ramierez](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jose\_Ramierez](https://discuss.elastic.co/u/Jose_Ramierez)\
**Post date:** [November 15, 2018, 1:40am UTC](https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750/6 "2018-11-15T01:40:44Z")

</div>

> [@warkolm](#):
>
> I've seen it on a few occasions in the past but it's super rare and usually extremely hard to cause.

OK, what should I do next? (This is a production index, the .NET code has no trouble getting to it, but I am stuck on the interactive side...)

---

<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 13, 2018, 1:40am UTC](https://discuss.elastic.co/t/how-to-query-elasticsearch-i-keep-getting-index-not-found-exception/156750/7 "2018-12-13T01:40:49Z")

</div>

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