Ignore Global Filters in Custom Plugin - Kibana 5.5

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?

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

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. 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

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

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!

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

Thanks,
Ronel

@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
to exclude certain filters.

Ok thanks Brandon! Will that work for 5.5?

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.

Ok thanks for your quick replies Brandon!

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