# Wildcard in \_close index request get index\_not\_found\_exception

**URL:** <https://discuss.elastic.co/t/wildcard-in--close-index-request-get-index-not-found-exception/73058>\
**Category:** Elasticsearch\
**Created:** [January 27, 2017, 7:34pm UTC](https://discuss.elastic.co/t/wildcard-in--close-index-request-get-index-not-found-exception/73058 "2017-01-27T19:34:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![qreul](https://avatars.discourse-cdn.com/v4/letter/q/4491bb/32.png) [@qreul](https://discuss.elastic.co/u/qreul)\
**Post date:** [January 27, 2017, 7:34pm UTC](https://discuss.elastic.co/t/wildcard-in--close-index-request-get-index-not-found-exception/73058/1 "2017-01-27T19:34:33Z")

</div>

As part of the [Elasticsearch 2.1 documentation](https://www.elastic.co/guide/en/elasticsearch/reference/2.1/indices-open-close.html), I see that wildcard (i.e. "\*") can be used in requests to open / close a set of indices. However, I get an error when performing the request in Linux.  
Request

```
curl -X POST http://$host:$port/context_*/_close?ignore_unavailable=true

```

Response

```
{
  "error":{
    "root_cause":[
      {
        "type":"index_not_found_exception",
        "reason":"no such index",
        "index":"context_*",
        "resource.type":"index_or_alias",
        "resource.id":"context_*"
      }
    ],
    "type":"index_not_found_exception","reason":"no such index",
    "index":"context_*",
    "resource.type":"index_or_alias",
    "resource.id":"context_*"
  },
  "status":404
} 

```

Can someone provide some insights on how to resolve this issue?

---

<div class="post-metadata">

**Author:** ![JKhondhu](https://avatars.discourse-cdn.com/v4/letter/j/ed655f/32.png) [@JKhondhu](https://discuss.elastic.co/u/JKhondhu)\
**Post date:** [January 27, 2017, 8:44pm UTC](https://discuss.elastic.co/t/wildcard-in--close-index-request-get-index-not-found-exception/73058/2 "2017-01-27T20:44:08Z")

</div>

The syntax is correct, however is your index naming convention "context\_\*" correct?

---

<div class="post-metadata">

**Author:** ![qreul](https://avatars.discourse-cdn.com/v4/letter/q/4491bb/32.png) [@qreul](https://discuss.elastic.co/u/qreul)\
**Post date:** [January 27, 2017, 9:59pm UTC](https://discuss.elastic.co/t/wildcard-in--close-index-request-get-index-not-found-exception/73058/3 "2017-01-27T21:59:05Z")

</div>

The "context\_\*" is the correct pattern based on how indices are defined (e.g. "context\_f4d30bf8-625b-4965-9480-468b3558360c"). Should the wildcard be marked up explicitly?

---

<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, 2017, 9:59pm UTC](https://discuss.elastic.co/t/wildcard-in--close-index-request-get-index-not-found-exception/73058/4 "2017-02-24T21:59:08Z")

</div>

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