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?