# Filtered alias not working

**URL:** <https://discuss.elastic.co/t/filtered-alias-not-working/342139>\
**Category:** Elasticsearch\
**Created:** [September 1, 2023, 4:56pm UTC](https://discuss.elastic.co/t/filtered-alias-not-working/342139 "2023-09-01T16:56:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amani188](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Amani188](https://discuss.elastic.co/u/Amani188)\
**Post date:** [September 1, 2023, 4:56pm UTC](https://discuss.elastic.co/t/filtered-alias-not-working/342139/1 "2023-09-01T16:56:32Z")

</div>

Hi ,  
I'm trying to create an alias filtered based on existing field but it seems not working

Does anyone have any idea about this issue?

POST /\_aliases  
{  
"actions" : [  
{  
"add" : {  
"index" : "myIndex",  
"alias" : "alias\_test",  
"filter" : {  
"terms" : { "log.file.path" :["/progiciel/test/jboss/standalone/log/\*"]}  
}  
}  
}  
]  
}

Thanks

---

<div class="post-metadata">

**Author:** ![RabBit\_BR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rabbit_br/32/82261_2.png) [@RabBit\_BR](https://discuss.elastic.co/u/RabBit_BR)\
**Post date:** [September 1, 2023, 10:10pm UTC](https://discuss.elastic.co/t/filtered-alias-not-working/342139/2 "2023-09-01T22:10:32Z")

</div>

Hi @Amani188

Could you give more details about the problem you are facing? Is there an error or do you have no results? If you can provide some example for simularia that would be great.

---

<div class="post-metadata">

**Author:** ![Amani188](https://avatars.discourse-cdn.com/v4/letter/a/b487fb/32.png) [@Amani188](https://discuss.elastic.co/u/Amani188)\
**Post date:** [September 5, 2023, 2:01pm UTC](https://discuss.elastic.co/t/filtered-alias-not-working/342139/3 "2023-09-05T14:01:27Z")

</div>

Hi,  
I want to create an alias based on filter but i don't have result , I've tried without filter it works i can see data in kibana but with filter it seems not working.

---

<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:** [October 3, 2023, 2:02pm UTC](https://discuss.elastic.co/t/filtered-alias-not-working/342139/4 "2023-10-03T14:02:09Z")

</div>

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