Elasticsearch has a profiler API through which we can inspect and analyze the search queries, but it has a very large JSON output, which is quite difficult to analyze manually. Kibana Dev Tools with X-Pack provides a simple way to inspect and analyze the Elasticsearch profiler result. Dev Tools transforms the Elasticsearch JSON output into query profile's visualization, through which we can easily inspect what is happening and analyze it, and in this way, we can diagnose poorly performing queries and fix them thereafter.
For profiling the Elasticsearch query, we need to click on the Search Profiler link after the console link. This will open the following screen:
By default, the _all index is autopopulated under the Index field, which we can change to any specific Elasticsearch index. Now click on the Profile button, which will...