# \_cat indice filtering by index wildcard

**URL:** <https://discuss.elastic.co/t/cat-indice-filtering-by-index-wildcard/238154>\
**Category:** Elasticsearch\
**Created:** [June 22, 2020, 9:09pm UTC](https://discuss.elastic.co/t/cat-indice-filtering-by-index-wildcard/238154 "2020-06-22T21:09:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![morty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/morty/32/70847_2.png) [@morty](https://discuss.elastic.co/u/morty)\
**Post date:** [June 22, 2020, 9:09pm UTC](https://discuss.elastic.co/t/cat-indice-filtering-by-index-wildcard/238154/1 "2020-06-22T21:09:03Z")

</div>

According to this endpoint [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html)

> (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

```auto
docker run -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.8.0

```

- Create indexes

```auto
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

```auto
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

```auto
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?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 20, 2020, 9:09pm UTC](https://discuss.elastic.co/t/cat-indice-filtering-by-index-wildcard/238154/2 "2020-07-20T21:09:14Z")

</div>

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