# Null Value Replacement in Mapping does not work using NEST

**URL:** <https://discuss.elastic.co/t/null-value-replacement-in-mapping-does-not-work-using-nest/299553>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [March 13, 2022, 4:09am UTC](https://discuss.elastic.co/t/null-value-replacement-in-mapping-does-not-work-using-nest/299553 "2022-03-13T04:09:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xef](https://avatars.discourse-cdn.com/v4/letter/x/898d66/32.png) [@xef](https://discuss.elastic.co/u/xef)\
**Post date:** [March 13, 2022, 4:09am UTC](https://discuss.elastic.co/t/null-value-replacement-in-mapping-does-not-work-using-nest/299553/1 "2022-03-13T04:09:42Z")

</div>

We have ES version 17.14 and have a mapping for our Index:  
`.Keyword(s => s.Name(c => c.Website).Index(false).NullValue(""))`  
But if we try to use the update API :

```auto
 var result = await client.UpdateAsync<object>(post.Id, u => u
                 .Index("services-posts")
                 .Doc(new
                 {
                    Website = null
                  }

```

The field keeps its original value and does not replace it with the value specified in the mapping.  
Any Ideas? Thanks

---

<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:** [April 10, 2022, 4:10am UTC](https://discuss.elastic.co/t/null-value-replacement-in-mapping-does-not-work-using-nest/299553/2 "2022-04-10T04:10:32Z")

</div>

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