# How to Update Mapping using Object Initializer Syntax

**URL:** <https://discuss.elastic.co/t/how-to-update-mapping-using-object-initializer-syntax/318198>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [November 4, 2022, 2:27pm UTC](https://discuss.elastic.co/t/how-to-update-mapping-using-object-initializer-syntax/318198 "2022-11-04T14:27:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![schawla](https://avatars.discourse-cdn.com/v4/letter/s/87869e/32.png) [@schawla](https://discuss.elastic.co/u/schawla)\
**Post date:** [November 4, 2022, 2:27pm UTC](https://discuss.elastic.co/t/how-to-update-mapping-using-object-initializer-syntax/318198/1 "2022-11-04T14:27:53Z")

</div>

Can someone help me with how to achieve below query using NEST in object initializer syntax.

```auto
PUT /my-index-000001/_mapping
{
  "properties": {
    "email": {
      "type": "keyword"
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 2, 2022, 2:28pm UTC](https://discuss.elastic.co/t/how-to-update-mapping-using-object-initializer-syntax/318198/2 "2022-12-02T14:28:34Z")

</div>

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