0

Unfortunately i created an Index in Elasticsearch with the name: "%{[@metadata][beat]}-2016.11.17"

Any Idea how to delete it, and not run into Problems with the special Characters?

What i tried - on console:

curl -XDELETE -g '10.108.72.213:9200/%{[@metadata][beat]}-2016.11.18?pretty'
{
  "error" : {
    "root_cause" : [
      {
        "type" : "illegal_argument_exception",
        "reason" : "invalid escape sequence `%{[' at index 0 of: %{[@metadata][beat]}-2016.11.18"
      }
    ],
    "type" : "illegal_argument_exception",
    "reason" : "invalid escape sequence `%{[' at index 0 of: %{[@metadata][beat]}-2016.11.18"
  },
  "status" : 400
}

on kibana dev tools console:

DELETE %{[@metadata][beat]}-2016.11.18/
{
  "error": {
    "root_cause": [
      {
        "type": "index_not_found_exception",
        "reason": "no such index",
        "index_uuid": "_na_",
        "resource.type": "index_or_alias",
        "resource.id": "%7B[@metadata][beat]}-2016.11.18",
        "index": "%7B[@metadata][beat]}-2016.11.18"
      }
    ],
    "type": "index_not_found_exception",
    "reason": "no such index",
    "index_uuid": "_na_",
    "resource.type": "index_or_alias",
    "resource.id": "%7B[@metadata][beat]}-2016.11.18",
    "index": "%7B[@metadata][beat]}-2016.11.18"
  },
  "status": 404
}

any Ideas?

0

1 Answer 1

3

You may find the URL-encoded version of that to be more likely to be accepted:

curl -XDELETE -g '10.108.72.213:9200/%25%7b%5b%40metadata%5d%5bbeat%5d%7d-2016.11.18
2
  • Any Tips for tools to convert string to URL-encoded Format? Commented Feb 3, 2017 at 8:14
  • @Til I don't know of any command-line utils, but python, perl, and ruby all have one-liners that can do it. Or, look up 'urlencode' sites on the web.
    – sysadmin1138
    Commented Feb 4, 2017 at 4:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .