Update _meta using NEST

I'm using the _meta field to store information about my index. When I initialize the index, I'm able to add the meta-data using the following NEST syntax:

await Client.CreateIndexAsync(plugin.IndexName, (index) => index
    .Mappings(ms => ms
        .Map<IndexedObject>(m => m.AutoMap()
        .Meta(d => d.Add("foo", "bar"))
        )
    ));

The mapping is correctly saved as indicated by performing a GET /myindex/_mapping:

"myindex": {
    "mappings": {
      "indexedobject": {
        "_meta": {
          "foo": "bar"
        }
...

Once the index is created and populated, I need a way to update the the _meta tag. Using kibana, I can execute the following statement and the index is correctly updated:

POST /npairindex/_mapping/indexedobject
{
  "_meta": {
    "foo": "bar2"
  }
}

How do I perform the previous statement using NEST? Any help would be greatly appreciated.

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