How to convert a hashmap to co.elastic.clients.json.JsonData in new elasticsearch Java client API?
I am doing this conversion to provide the document to a IndexRequest.Builder.
IndexRequest.Builder<JsonData> request =
new IndexRequest.Builder<JsonData>().index(indexName).id(1);
request.document(______);
Is it required to convert the hashmap to Json string first, then to JsonData?
or is there a way to directly convert hashMap to JsonData that can be feed to the IndexRequest?