Hey I trying to update existing document
of ElasticSearch
, I found a cURL
code from Elasticsearch site
Note: Sam
type with 2
document is already exists I just want to update a existing field
POST /EmployeeIndex/Sam/2/_update
{
"doc" : {
"Nested" : true,
"views": 0
}
}
Its working perfectly how I need but please help me to convert it to NEST
, as i working on .NET
, I managed to write a code
var responseUpdate = client.Update<clsEmployeeElasticSearch, object>(u => u
.Index("EmployeeIndex")
.Type("Sam")
.Id(2)
.Doc(new { Nested= true })
.RetryOnConflict(3)
.Refresh());
But it always creating a new field in my document
instead of updating existing one.
Please see attached screenshot with a code
Please help guys.