# Ignore Global Filters in Custom Plugin - Kibana 5.5

**URL:** <https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152>\
**Category:** Kibana\
**Created:** [March 8, 2018, 10:39pm UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152 "2018-03-08T22:39:06Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ronelfernandez](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@ronelfernandez](https://discuss.elastic.co/u/ronelfernandez)\
**Post date:** [March 8, 2018, 10:39pm UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/1 "2018-03-08T22:39:06Z")

</div>

I see that some of the plugins, like Visual Builder, have an option to ignore global filters.

How can a custom plugin (a plugin that I write myself) that uses search, say a modified version of Table Vis achieve the same thing? I looked in the code and there's no easy way to do it. Can you please point me where to start and how to achieve it?

---

<div class="post-metadata">

**Author:** ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)\
**Post date:** [March 9, 2018, 5:16am UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/2 "2018-03-09T05:16:32Z")

</div>

First lets start with the basics...have you looked at few of our blogs which show you ways to build your own custom plugins:  
[https://www.elastic.co/elasticon/conf/2016/sf/how-to-build-your-own-kibana-plugins](https://www.elastic.co/elasticon/conf/2016/sf/how-to-build-your-own-kibana-plugins)

Apart from the link above, there's been some tutorials by community members, e.g. [https://www.timroes.de/2015/12/02/writing-kibana-4-plugins-basics/381](https://www.timroes.de/2015/12/02/writing-kibana-4-plugins-basics/381). That one applies to Kibana 4 as well, but changes are reasonably minimal between 4 and 5.

I would also check out some examples; many use the same templates. [https://github.com/elastic/kibana/wiki/Known-Plugins458](https://github.com/elastic/kibana/wiki/Known-Plugins458)

see if this helps, else we can guide u more on actual disabling of global filters . You would have to hack the code to suit ur needs.

Thanks  
Rashmi

---

<div class="post-metadata">

**Author:** ![ronelfernandez](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@ronelfernandez](https://discuss.elastic.co/u/ronelfernandez)\
**Post date:** [March 9, 2018, 7:01am UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/3 "2018-03-09T07:01:28Z")

</div>

We were able to author our own plugins. I know I have to hack the code to suit our needs.

Is it achievable what I am asking?

Basically I have to have a version of Table Vis where global filters don't apply to it, but of course global filters will work as normal for others.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ronelfernandez](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@ronelfernandez](https://discuss.elastic.co/u/ronelfernandez)\
**Post date:** [March 9, 2018, 8:05am UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/4 "2018-03-09T08:05:46Z")

</div>

![00%20AM](https://us1.discourse-cdn.com/elastic/original/3X/0/f/0f9048277c2ebff6c8c46fa31686c0f78a858278.png)

My investigation leads me to this file. Is SearchSourceProvider context aware? Does it know which vis it's currently on?

Thanks,  
Ronel

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [March 9, 2018, 6:43pm UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/5 "2018-03-09T18:43:21Z")

</div>

@ronelfernandez by default, all Search Sources's inherit from the "global search source" which has the timefilter as well as the pinned filters.

If you have access to the search source for the table vis, you can do something like what we do [here](https://github.com/elastic/kibana/blob/master/src/ui/public/visualize/visualize.js#L74)  
to exclude certain filters.

---

<div class="post-metadata">

**Author:** ![ronelfernandez](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@ronelfernandez](https://discuss.elastic.co/u/ronelfernandez)\
**Post date:** [March 9, 2018, 7:04pm UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/6 "2018-03-09T19:04:55Z")

</div>

Ok thanks Brandon! Will that work for 5.5?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [March 9, 2018, 7:22pm UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/7 "2018-03-09T19:22:28Z")

</div>

It will not, we implemented the addFilterPredicate functionality recently. You could also potentially use the `SearchSource.inherits(null)` method, which will stop all search source inheritance, but that will exclude the global time filters as well, so you'd have to find a way to specify those.

---

<div class="post-metadata">

**Author:** ![ronelfernandez](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@ronelfernandez](https://discuss.elastic.co/u/ronelfernandez)\
**Post date:** [March 9, 2018, 7:23pm UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/8 "2018-03-09T19:23:00Z")

</div>

Ok thanks for your quick replies Brandon!

---

<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:** [April 6, 2018, 7:23pm UTC](https://discuss.elastic.co/t/ignore-global-filters-in-custom-plugin-kibana-5-5/123152/9 "2018-04-06T19:23:01Z")

</div>

Closed on April 6, 2018, 7:23pm UTC

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