# Filter applied to specific data view (index pattern)

**URL:** <https://discuss.elastic.co/t/filter-applied-to-specific-data-view-index-pattern/304669>\
**Category:** Kibana\
**Created:** [May 13, 2022, 11:08am UTC](https://discuss.elastic.co/t/filter-applied-to-specific-data-view-index-pattern/304669 "2022-05-13T11:08:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andersg](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@andersg](https://discuss.elastic.co/u/andersg)\
**Post date:** [May 13, 2022, 11:08am UTC](https://discuss.elastic.co/t/filter-applied-to-specific-data-view-index-pattern/304669/1 "2022-05-13T11:08:49Z")

</div>

Hi,

I find it powerful to mix content from different types of indexes in Kibana dashboards, but have a difficult time setting up useful dashboards because of global filtering. I do however want to use filters and add controls for easy selection of content to view.

A recent example is that I want to compare a set of collected values in an index matched by `data_view_a` with reference lines based on values in an index matched by `data_view_b`. `data_view_a` and `data_view_b` don't have many filed in common, and as soon as a filed specific to one data view is included in the filter everything related to the other is filtered out.

What would help is the possibility to have filters targeting only a specific data view. For example a query on the form `data_view_a.source : source_1 and data_view_b.reference_set : reference_set_2` or similar constructions for other types of filters.

The best solution I've found so far is to add missing fields to my data views, emitting a fixed value which will never occur in the real data from that field in other data views. Then I include that value among the ones to filter for. But if I want include more data views along with specific filters it quickly becomes cumbersome.

I'm quite new to Kibana, so maybe I'm doing things backwards and that there are better ways of solving this. Yet I find others having similar issues that indicate some feature may be missing.  
One example is [Apply filter for individual visualization in dashboard](https://discuss.elastic.co/t/apply-filter-for-individual-visualization-in-dashboard/284275)

Any ideas for how to better achieve what I want to do?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [May 18, 2022, 4:14pm UTC](https://discuss.elastic.co/t/filter-applied-to-specific-data-view-index-pattern/304669/2 "2022-05-18T16:14:08Z")

</div>

The advanced setting `courier:ignoreFilterIfFieldNotInIndex` could help with this.

---

<div class="post-metadata">

**Author:** ![andersg](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@andersg](https://discuss.elastic.co/u/andersg)\
**Post date:** [May 23, 2022, 8:03am UTC](https://discuss.elastic.co/t/filter-applied-to-specific-data-view-index-pattern/304669/3 "2022-05-23T08:03:19Z")

</div>

Great! This sounds exactly like what I'm looking for. Enabling it being in the advanced setting makes me think that there can be some unexpected side effects though.

What is Kibana looking at to determine if a field exists or not? Actual data in index, mapping, data view...?

Could I get more data than expected if I have daily indices and a field that only exists in documents a few times a month?

---

<div class="post-metadata">

**Author:** ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)\
**Post date:** [May 25, 2022, 5:44pm UTC](https://discuss.elastic.co/t/filter-applied-to-specific-data-view-index-pattern/304669/4 "2022-05-25T17:44:08Z")

</div>

It's looking at the combined mapping of all indices matching the index pattern of the selected data view (irregardless whether they are actually hit by the current query or not)

---

<div class="post-metadata">

**Author:** ![andersg](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@andersg](https://discuss.elastic.co/u/andersg)\
**Post date:** [June 16, 2022, 7:58am UTC](https://discuss.elastic.co/t/filter-applied-to-specific-data-view-index-pattern/304669/5 "2022-06-16T07:58:22Z")

</div>

Perfect! Tried this out now, and it was just what I needed!

Thanks!

---

<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:** [July 14, 2022, 7:58am UTC](https://discuss.elastic.co/t/filter-applied-to-specific-data-view-index-pattern/304669/6 "2022-07-14T07:58:38Z")

</div>

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