# Elasticsearch alias issue with filtering

**URL:** <https://discuss.elastic.co/t/elasticsearch-alias-issue-with-filtering/343268>\
**Category:** Elasticsearch\
**Created:** [September 18, 2023, 1:44pm UTC](https://discuss.elastic.co/t/elasticsearch-alias-issue-with-filtering/343268 "2023-09-18T13:44:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ricadao](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@ricadao](https://discuss.elastic.co/u/ricadao)\
**Post date:** [September 18, 2023, 1:44pm UTC](https://discuss.elastic.co/t/elasticsearch-alias-issue-with-filtering/343268/1 "2023-09-18T13:44:47Z")

</div>

Hi. I have on Index fullData where I store documents from various sources, having one field as docSource. After that, created an alias over this fullData to have a view over source='phone' with the following code:

```auto
POST /_aliases?pretty
{
 "actions": [
   {
     "add": {
       "index": "fullData",
       "alias": "sourceData-phone",
       "filter": {
         "term": {
           "docSource": "phone"
         }
       }
     }
   }
 ]
}

```

I then created some Lens Visualizations, added to a dashboard and it all seemed fine.  
The problem is when I want to add a filter using the "add filter" and select "docSource is", the dropdown is showing all the other sources from the main index. If I select "Web", it returns 0 rows but I don't want the user to know which sources we have available. Is there a workaround for this?

I'm using Elastic version 7.17

Thank you

---

<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 16, 2023, 1:45pm UTC](https://discuss.elastic.co/t/elasticsearch-alias-issue-with-filtering/343268/2 "2023-10-16T13:45:08Z")

</div>

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