# Filtering based on \_index in kibana dashboard

**URL:** <https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170>\
**Category:** Kibana\
**Created:** [December 10, 2018, 12:43pm UTC](https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170 "2018-12-10T12:43:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlueSpirit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluespirit/32/44056_2.png) [@BlueSpirit](https://discuss.elastic.co/u/BlueSpirit)\
**Post date:** [December 10, 2018, 12:43pm UTC](https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170/1 "2018-12-10T12:43:08Z")

</div>

I have multiple visualizations added to a dashboard. All visualizations use an index pattern 'raw\_request\*'.  
Now my data comes in different indices like 'raw\_requests\_p1' and 'raw\_requests\_p2'.

So, in dashboard, I applied a filter as \_index: "raw\_requests\_p1" to fetch only relevant records. But this does not fetch me any records. Is this not possible or I might be doing something wrong?

P.S. the individual indices do have records for the set time range.

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [December 10, 2018, 10:42pm UTC](https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170/2 "2018-12-10T22:42:48Z")

</div>

Using the `_index` field seems to work on my local dataset, so it should be possible.

Are you creating a filter, or just adding that to the query bar at the top? Can you share a screenshot of what you're doing? Ideally with the filter open if it's a filter, like this:

![29](https://us1.discourse-cdn.com/elastic/original/3X/6/0/60982cbf6be6795e7472922b10f1043e7d9d5c23.png)

---

<div class="post-metadata">

**Author:** ![BlueSpirit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluespirit/32/44056_2.png) [@BlueSpirit](https://discuss.elastic.co/u/BlueSpirit)\
**Post date:** [December 11, 2018, 4:14am UTC](https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170/3 "2018-12-11T04:14:23Z")

</div>

So, I am using Kibana version 5.7  
Also, I tried both ways and the results did not vary. Right now, I do not have access to my system, but its exactly like the way you have done in your screenshot. Except that, the 'index field is not a drop down but a text box'.

---

<div class="post-metadata">

**Author:** ![BlueSpirit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluespirit/32/44056_2.png) [@BlueSpirit](https://discuss.elastic.co/u/BlueSpirit)\
**Post date:** [December 11, 2018, 7:04pm UTC](https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170/4 "2018-12-11T19:04:20Z")

</div>

Fixed now!!  
I had modified the visualization objects in kibana to now point to the index pattern 'raw\_requests\*' rather than 'raw\_requests\_p1' which was present before hand.  
The changes got lost in b/w snapshot recovery and other operations on dashboard.  
So, it works correctly now.  
Also, later I still had similar issue which happened because I forgot to reapply mapping to one of the indices while recreating it.

---

<div class="post-metadata">

**Author:** ![Joe\_Fleming](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/joe_fleming/32/3561_2.png) [@Joe\_Fleming](https://discuss.elastic.co/u/Joe_Fleming)\
**Post date:** [December 13, 2018, 11:20pm UTC](https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170/5 "2018-12-13T23:20:51Z")

</div>

> All visualizations use an index pattern 'raw\_request\*'.

Ah, so we were both operating under the wrong assumption here 😉

Glad you got it working, and thank you for following up with the solution here!

---

<div class="post-metadata">

**Author:** ![BlueSpirit](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bluespirit/32/44056_2.png) [@BlueSpirit](https://discuss.elastic.co/u/BlueSpirit)\
**Post date:** [December 14, 2018, 9:10am UTC](https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170/6 "2018-12-14T09:10:50Z")

</div>

Yeah, my bad. Patient debugging got it right. Thank you for helping out. Hopefully this will fix someone else's issue too.

---

<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:** [January 11, 2019, 9:10am UTC](https://discuss.elastic.co/t/filtering-based-on-index-in-kibana-dashboard/160170/7 "2019-01-11T09:10:51Z")

</div>

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