I am creating an external plugin in Kibana 8.8.1 using React.
I want to write data to an Elasticsearch index on a button click inside the plugin.
I presume I will have to use the Elasticsearch service provided by the core API. Or is there any other alternative?
How can I use the Elasticsearch service? There is not much documentation regarding the same except for this (Elasticsearch service | Kibana Guide [8.9] | Elastic), which doesn't explain how to use it.