Updating document and adding new field in elastic search
<p>We have usecase that data will be updated daily. Some of attributes of document changes and some of new record is there. Is it possible to reindex data with updated value, which is already there and add new reocord.
if yes, please explain how.</p>

<p>Is it with update API?</p>

<p>I am indexing like this</p>

<pre><code> String json = getJsonMapper().writeValueAsString(data);
    bulkRequestBuilder.add(getClient().prepareIndex(indexName, typeName).setSource(json));
</code></pre>

<p>I am not passing any id. How can i update this. What is best way</p>