# Filtering documents with another index

**URL:** https://discuss.elastic.co/t/filtering-documents-with-another-index/303956
**Category:** Kibana
**Created:** [May 4, 2022, 3:13pm UTC](https://discuss.elastic.co/t/filtering-documents-with-another-index/303956 "2022-05-04T15:13:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Andrea\_Bozzano](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrea_bozzano/32/73731_2.png) [@Andrea\_Bozzano](https://discuss.elastic.co/u/Andrea_Bozzano)
#### Post date: [May 4, 2022, 3:13pm UTC](https://discuss.elastic.co/t/filtering-documents-with-another-index/303956/1 "2022-05-04T15:13:37Z")

</div>

Hi everyone, and thank you for your time reading this.

I'm having two indexes, let's think of those, for sake of semplicity, as:

- index1: log content file
- index2: list of hostnames

Now, I developed a dashboard in Kibana to have some visualizations on index1.  
Suppose that you want to see the content of index1 for the hostnames in index2. Is it possible to do that in Kibana? If yes, how can I setup, for example, a global filter or a dropdown menù to filter the data of index1 with the property hostname of index2?.  
They have a common property, let's call it "hostname".

Thank you for every answer or hint, it will be appreciated 🙂

Ciao! 🙂

---

<div class="post-metadata">

### Author: ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)
#### Post date: [May 4, 2022, 4:51pm UTC](https://discuss.elastic.co/t/filtering-documents-with-another-index/303956/2 "2022-05-04T16:51:32Z")

</div>

The `Controls` panel does exactly that.

> **[Make dashboards interactive | Kibana Guide \[8.2\] | Elastic](https://www.elastic.co/guide/en/kibana/current/drilldowns.html#add-controls)**
>
> Add interactive capabilities to your dashboard, such as controls that allow you to apply dashboard-level filters, and drilldowns that allow you to navigate to other dashboards and external websites.

You don't need to provide a second index, since the control will check for the available values for `hostname` in `index1` and offer them as options.

See a quick demo with the Kibana Sample Data Flights index.

![Peek 2022-05-04 18-50](https://us1.discourse-cdn.com/elastic/original/3X/9/c/9ce299f6d6b2fd064f85345d26b622b7783f6551.gif)

But if for whatever reason you need to get more control on what is exposed in the list, you can simply point the control to `index2` instead and it will work as well if the fields are named equally. I would not recommend this option, though.

---

<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: [June 1, 2022, 4:51pm UTC](https://discuss.elastic.co/t/filtering-documents-with-another-index/303956/3 "2022-06-01T16:51:41Z")

</div>

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