What is the possible way to delete this index ONLY?

Hi there,
I have created one index by accident => "dte-%{jobid}". So currently if I was to check all the indexes by this server, that is what I see now:
curl -XGET "http://localhost:9200/_cat/indices ==>
"
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
101 2541 101 2541 0 0 76285 0 --:--:-- --:--:-- --:--:-- 79406
green open dte-36359429 YYu0kcH4QeajC6QBfyAoIg 5 1 1543198 0 740.1mb 370mb
green open dte-36503651 Tj0aph4_Ruq-iTQQrE_eRw 5 1 146423 0 68.3mb 34.2mb
green open dte-%{jobid} kG3sh3w5SA6iDGrC3YxAEg 5 1 3066 0 2.3mb 1.2mb
...
".
And if I was to delete that one by this command,
==>> curl -X DELETE "http://localhost:9200/dte-%{jobid}",
I got this response:
"
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"invalid escape sequence %jo' at index 5 of: dte-\\%jobid"}],"type":"illegal_argument_exception","reason":"invalid escape sequence%jo' at index 5 of: dte-\%jobid"},"status":400}
"
Does anyone know what is the possible way to have this removed only ?

Thanks a lot.

Chun

Just percent-encode the URL:

$ curl -XDELETE localhost:9200/dte-%25%7bjobid%7d?pretty=1
1 Like

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