# Filtered Alias not working properly

**URL:** <https://discuss.elastic.co/t/filtered-alias-not-working-properly/167261>\
**Category:** Elasticsearch\
**Created:** [February 6, 2019, 10:31am UTC](https://discuss.elastic.co/t/filtered-alias-not-working-properly/167261 "2019-02-06T10:31:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praneet\_Khandelwal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praneet_khandelwal/32/40565_2.png) [@Praneet\_Khandelwal](https://discuss.elastic.co/u/Praneet_Khandelwal)\
**Post date:** [February 6, 2019, 10:31am UTC](https://discuss.elastic.co/t/filtered-alias-not-working-properly/167261/1 "2019-02-06T10:31:39Z")

</div>

I want to create an alias which points to a certain index pattern but filtered on the basis of a particular field. I ran the following as a curl command.

```auto
{
    "actions" : [
        {
            "add" : {
                 "index" : "pa-2018.12.31",
                 "alias" : "pa-logs",
                 "filter" : { "term" : { "tags" : "XXXX" } }
            }
        }
    ]
}

```

The above curl command gives true in response but the alias can not be seen in the kibana management tab. Although when I remove the filter statement, it seems to be working fine.

```auto
{
    "actions" : [
        {
            "add" : {
                 "index" : "pa-2018.12.31",
                 "alias" : "pa-logs"
            }
        }
    ]
}

```

This seems to be working fine. Is there something I am missing or is there any other way of achieving the same functionality/

---

<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:** [March 6, 2019, 10:31am UTC](https://discuss.elastic.co/t/filtered-alias-not-working-properly/167261/2 "2019-03-06T10:31:42Z")

</div>

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