我已使用以下方法通过NEST成功更新了Elasticsearch索引中的现有项目。请注意,在此示例中,您只需要发送带有希望更新的字段的部分文档。
// Create partial document with a dynamic dynamic updateDoc = new System.Dynamic.ExpandoObject(); updateDoc.Title = "My new title"; var response = client.Update<Elasticsearchdocument, object>(u => u .Index("movies") .Id(doc.Id) .document(updateDoc) );您可以在GitHub Source的NEST Update Unit
Tests中找到发送更新的方法的更多示例。



