Index exist using wildcard

I am getting weird behavior when I use a wildcard, when checking if index exist or not using <curl -I -XHEAD http://localhost:9200/index /> pattern. Regardless whether an index with this prefix exist or not a match is always found hence, I am always getting 200 OK
< curl -I -XHEAD http://localhost:9200/random*
HTTP/1.1 200 OK
content-type: application/json; charset=UTF-8
content-length: 2
/>
there is no index that named or have a prefix "random".
So question: Is that a bug or expected behavior?

hey,

try playing around with some indices options like mentioned at https://www.elastic.co/guide/en/elasticsearch/reference/7.3/multi-index.html

HEAD foo*?allow_no_indices=false

this might be what you are after?

--Alex

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