I want to partially update the elasticsearch record. I have created methods for Indexing but it basically overwrites the full document. I have a scenario where I want to partially update the record. Can anyone please point me to how this can be accomplished. This is the method I have for Indexing.
public async Task<IIndexResponse> IndexAsync<T>(T data, string indexName, string typeName) where T : class
{
if (indexName == null)
{
throw new ArgumentNullException("Index name is null. Please provide index name to insert the data.");
}
return await Client.IndexAsync<T>(data, i => i
.Index(indexName)
.Type(typeName)
.OpType(OpType.Create));
}