I am going through the new Elasticsearch's Java REST client and looking at different ways to index a document ( here https://www.elastic.co/guide/en/elasticsearch/client/java-rest/7.3/java-rest-high-document-index.html )
Is there any possibility where I can pass my Java Pojo to Index? like following
IndexRequest request = new IndexRequest("posts");
request.id("1");
request.source(new User("1", "Foo", 22, new Date()));
IndexResponse indexResponse = client.index(request, RequestOptions.DEFAULT);