Create Kibana plugin to write x-large queries

I have an Elasticsearch index of millions of documents. Elasticsearch provides the ability to build statistics and aggregations out of this data and Kibana provides a nice out-of-the-box way to visualize this data.

However, my users want to be able to have statistics, aggregations and visualizations over a random subsets of the mentioned data. So, for example to be able to upload a text file that contains thousands of "_id"s and Kibana takes care of querying for these _id's instead of the user has to write them one by one in the search-bar.

I was thinking about building a Kibana plugin that renders an upload button in one of the dashboards (maybe as a visualization?) or in the Discover page. They user can use this button to upload a file with the _id's, then the plugin translates this list into an Elasticsearch query.
However, I know that Kibana uses the URL to carry the query which has a length constrain that prevents me from being able to convert the list of thousands _id's into an Elasticsearch query.

Is there a way to implement this functionality other than what I mentioned? What are the possible ways to do this other than building a separate interface?

Hi,

Have you tried using state:storeInSessionStorage: https://www.elastic.co/guide/en/kibana/7.10/advanced-options.html

This stores the state in the browsers session storage and keeps the URL shorter: https://myhost:5601/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=h@ed809a3

Be aware that this is still marked as experimental!

Best regards
Wolfram

1 Like

This seems to be something to look at. I am not sure, but maybe I can use the session storage in my plug in as well! I will look into this. Thanks!

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