Wildcard in _close index request get index_not_found_exception

As part of the Elasticsearch 2.1 documentation, 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?

The syntax is correct, however is your index naming convention "context_*" correct?

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?

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