Hi,
I want to index a document into amazonES . I am using Java REST client .
As per the documentation I found links to indexing a document as PUT method.
Map<String, String> params = Collections.emptyMap();
String jsonString = "{" +
"\"user\":\"kimchy\"," +
"\"postDate\":\"2013-01-30\"," +
"\"message\":\"trying out Elasticsearch\"" +
"}";
HttpEntity entity = new NStringEntity(jsonString, ContentType.APPLICATION_JSON);
Response response = restClient.performRequest("PUT", "/posts/doc/1", params, entity);
But I would like to know how to perform POST where I don't want to provide the id .
Please assist me with any docs or links.
Thanks.