Update data into elastic Search

hi ,

i am new to elastic search . i imported data using log stash with MySQL. now i want update
the some fields .
here problem is after imported data through log stash id created automatically in elastic search.

UpdateRequest updateRequest=new UpdateRequest();
updateRequest.index("indexName")
.type("id")
.id(id)
.doc(jsonBuilder().startObject().field("fieldname","value").endObject());

In Real Time how to know id for all the document.

Please share me how to update data into elastic search it should update into MySQL table also.

You should define the id from your documents instead IMO.

So the id of your entity is the id of elasticsearch document.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.