# Equivalent setting for following mapping in Elasticsearch 5.x

**URL:** <https://discuss.elastic.co/t/equivalent-setting-for-following-mapping-in-elasticsearch-5-x/80104>\
**Category:** Elasticsearch\
**Created:** [March 27, 2017, 9:02am UTC](https://discuss.elastic.co/t/equivalent-setting-for-following-mapping-in-elasticsearch-5-x/80104 "2017-03-27T09:02:11Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![avr](https://avatars.discourse-cdn.com/v4/letter/a/c77e96/32.png) [@avr](https://discuss.elastic.co/u/avr)\
**Post date:** [March 27, 2017, 9:02am UTC](https://discuss.elastic.co/t/equivalent-setting-for-following-mapping-in-elasticsearch-5-x/80104/1 "2017-03-27T09:02:11Z")

</div>

I've tried to find out an equivalent for mapping mentioned below, but couldn't succeed.

```
{
	"type": "string",
	"null_value": "NULL"
}

```

When I try the following:

```
{
	"type": "text",
	"null_value": "NULL"
}

```

It is giving unsupported parameter for `text` error.

Can someone provide pointers to fix this?

Thanks in Advance!

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 31, 2017, 6:41am UTC](https://discuss.elastic.co/t/equivalent-setting-for-following-mapping-in-elasticsearch-5-x/80104/2 "2017-03-31T06:41:23Z")

</div>

For now, the only way to solve that I believe is at index time or using an ingest script processor.

I opened the following issue for discussion:

> <https://github.com/elastic/elasticsearch/issues/23839>
>
> \`\`\`
> DELETE test
> PUT test
> {
> "mappings": {
> "my\_type": {
> "propert…ies": {
> "status\_code": {
> "type": "text",
> "null\_value": "NULL" 
> }
> }
> }
> }
> }
> \`\`\`
> 
> This is now failing in 5.x.
> 
> Either it's a bug and we should still support it or we should document it as a breaking change for people who are moving their \`string\` mapping to \`text\`.
> 
> Thoughts?

See also

> [@Why null\_value parameter has been removed for text field type?](https://discuss.elastic.co/t/why-null-value-parameter-has-been-removed-for-text-field-type/79882):
>
> I was searching for reasons behind removing null\_value parameter for text field mapping. But I didn't find any resources or some change log online. Can somebody help me out regarding this? Thanks in advance!

---

<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 28, 2017, 6:41am UTC](https://discuss.elastic.co/t/equivalent-setting-for-following-mapping-in-elasticsearch-5-x/80104/3 "2017-04-28T06:41:27Z")

</div>

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