_cat indice filtering by index wildcard

According to this endpoint documentation

(Optional, string) Comma-separated list or wildcard expression of index names used to limit the request.

But in reality it also checks for aliases which makes this filtering confusing
Steps to verify:

  • Run docker
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.8.0
  • Create indexes
curl -XPUT 127.0.0.1:9200/whatever; echo
{"acknowledged":true,"shards_acknowledged":true,"index":"whatever"}
curl -XPUT 127.0.0.1:9200/another; echo
{"acknowledged":true,"shards_acknowledged":true,"index":"another"}
  • Add alias to another as whatever1
curl -H'Content-type: application/json' -XPOST -d'{"actions": [{"add": {"index": "another", "alias": "whatever2"}}]}'  127.0.0.1:9200/_aliases 
{"acknowledged":true}
  • Filter by what* wildcard
curl 127.0.0.1:9200/_cat/indices/what*
yellow open another  GREkT6SoTuuf4SG18DkhVQ 1 1 0 0 208b 208b
yellow open whatever CYWp_-3RQt-AlmBPwlNvQg 1 1 0 0 208b 208b

Is this behavior intentional or am I missing something?

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