Create my own Discover to manage my data

Hello,

I asked in previous topic about the possibility of handling the Elasticsearch data via Discover UI. Unfortunately, this is not possible yet (you can find here the issue created on the github repo).

So, I decided to create my own Discover :crazy_face:
I started by displaying the index list in select component (using this app) :sunglasses:. But I don't have any idea how to display the data (UI and technically) :sob:

The question: is there an example which it can help me to get data in each select of indexName ? (in the Kibana server side). I'll appreciate it if the example is a source code.

Thanks for advance.
Warm regards,
Akrem.

Hey, there's a couple ways to get this done so I'll do a quick rundown, but there's room for creativity. We can dive deeper into any of these parts too, let me know.

  1. server: create a route that accepts an index pattern, and queries elasticsearch example, server docs
  2. server: in the route handler, you can use our client library for communicating with elasticsearch example, client docs
  3. ajax call from the browser
1 Like

For the route, I need a POST method to specify in the request the selected indexName, nah ?

Depends on how specific the request gets. If you want to include a large body in the request you'll want a POST. An example may be including an elasticsearch query.

If you only want results from an index name, a GET should be sufficient.

The index list is dynamic, so the GET isn't sufficient in this case.
Thanks :slight_smile:

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