# Alternative to using filtered index alias

**URL:** <https://discuss.elastic.co/t/alternative-to-using-filtered-index-alias/248419>\
**Category:** Elasticsearch\
**Created:** [September 12, 2020, 8:16pm UTC](https://discuss.elastic.co/t/alternative-to-using-filtered-index-alias/248419 "2020-09-12T20:16:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ilya.rybak](https://avatars.discourse-cdn.com/v4/letter/i/cab0a1/32.png) [@ilya.rybak](https://discuss.elastic.co/u/ilya.rybak)\
**Post date:** [September 12, 2020, 8:16pm UTC](https://discuss.elastic.co/t/alternative-to-using-filtered-index-alias/248419/1 "2020-09-12T20:16:00Z")

</div>

I'm trying to figure out possible solution to the following problem. In my current implementation I'm relying on so called filtered aliases where I can create a view of the same index for each user e.g.: POST /aliases { "actions": "add": { "index": "events", "alias": "events\_123", "filter": { "match": { "user\_id": "123" } } } }. All my write/read api calls are using aliases instead of the index name. Unfortunately, I cannot use filtered aliases anymore due to the recent changes related to introduction of index per day pattern managed by an external component. Is there a simple (or not so simple) way to provide my user\_id filter as a parameter to a rest api call. For example, if I had a POST /events\*/\_search {...} request, would it be possible to add an alias like filter without the need to modify the search query itself?

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [September 12, 2020, 8:32pm UTC](https://discuss.elastic.co/t/alternative-to-using-filtered-index-alias/248419/2 "2020-09-12T20:32:51Z")

</div>

The best way to do this is generally through document level security, although that is a commercial feature.

---

<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 10, 2020, 8:32pm UTC](https://discuss.elastic.co/t/alternative-to-using-filtered-index-alias/248419/3 "2020-10-10T20:32:51Z")

</div>

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