# Crying for help:: MapperParsingException when trying to create index with mapping

**URL:** <https://discuss.elastic.co/t/crying-for-help-mapperparsingexception-when-trying-to-create-index-with-mapping/21512>\
**Category:** Elasticsearch\
**Created:** [January 6, 2015, 10:00pm UTC](https://discuss.elastic.co/t/crying-for-help-mapperparsingexception-when-trying-to-create-index-with-mapping/21512 "2015-01-06T22:00:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Krishna\_Raj](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Krishna\_Raj](https://discuss.elastic.co/u/Krishna_Raj)\
**Post date:** [January 6, 2015, 10:00pm UTC](https://discuss.elastic.co/t/crying-for-help-mapperparsingexception-when-trying-to-create-index-with-mapping/21512/1 "2015-01-06T22:00:00Z")

</div>

Hi,

I am trying to create an index with mapping which contains nested object. I  
also tried to update the mapping of an empty created index with the same  
below mapping which contains nested object.

But I am getting MapperParsingException error all time. My cluster goes  
down and recoveres automatically. I am banging my head on this for last 1  
week with no help.

Any help is greatly appreciated.

Reference:  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html)

\*My Sample JSON: \*

{  
"timeStamp": "2014-12-31T19:15:45.000+0000",  
"metrics": [  
{  
"name": "viewList",  
"ave": 10.5  
},  
{  
"name": "checkout",  
"ave": 20.5  
},  
{  
"name": "login",  
"ave": 30.5  
},  
{  
"name": "logout",  
"ave": 40.5  
}  
]  
}

_Mapping I am trying:_

curl -XPUT '[http://myhost:9201/testagg/testagg/\_mapping](http://myhost:9201/testagg/testagg/_mapping)' -d '{  
"testagg": {  
"properties": {  
"timeStamp": {  
"format": "dateOptionalTime",  
"type": "date"  
},  
"properties": {  
"metrics": {  
"type": "nested",  
"properties": {  
"name": {  
"type": "string"  
},  
"ave": {  
"type": "double"  
}  
}  
}  
}  
}  
}  
}'

Thanks,  
Krishna Raj

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/b6c9049b-8ce0-4478-a954-adf89052b6e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b6c9049b-8ce0-4478-a954-adf89052b6e0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![masaru](https://avatars.discourse-cdn.com/v4/letter/m/a9a28c/32.png) [@masaru](https://discuss.elastic.co/u/masaru)\
**Post date:** [January 7, 2015, 5:49am UTC](https://discuss.elastic.co/t/crying-for-help-mapperparsingexception-when-trying-to-create-index-with-mapping/21512/2 "2015-01-07T05:49:51Z")

</div>

Hi,

Your mapping isn't correct. If you remove "properties" around "metrics", it  
should work.

* * *

## curl -XPUT "[http://localhost:9200/testagg/testagg/\_mapping](http://localhost:9200/testagg/testagg/_mapping)" -d' { "testagg": { "properties": { "timeStamp": { "format": "dateOptionalTime", "type": "date" }, "metrics": { "type": "nested", "properties": { "name": { "type": "string" }, "ave": { "type": "double" } } } } } }'

Masaru

On Wed, Jan 7, 2015 at 7:00 AM, Krishna Raj [reach.krishnaraj@gmail.com](mailto:reach.krishnaraj@gmail.com)  
wrote:

> Hi,
> 
> I am trying to create an index with mapping which contains nested object.  
> I also tried to update the mapping of an empty created index with the same  
> below mapping which contains nested object.
> 
> But I am getting MapperParsingException error all time. My cluster goes  
> down and recoveres automatically. I am banging my head on this for last 1  
> week with no help.
> 
> Any help is greatly appreciated.
> 
> Reference:  
> [Elastic — The Search AI Company | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html)
> 
> \*My Sample JSON: \*
> 
> {  
> "timeStamp": "2014-12-31T19:15:45.000+0000",  
> "metrics": [  
> {  
> "name": "viewList",  
> "ave": 10.5  
> },  
> {  
> "name": "checkout",  
> "ave": 20.5  
> },  
> {  
> "name": "login",  
> "ave": 30.5  
> },  
> {  
> "name": "logout",  
> "ave": 40.5  
> }  
> ]  
> }
> 
> _Mapping I am trying:_
> 
> curl -XPUT '[http://myhost:9201/testagg/testagg/\_mapping](http://myhost:9201/testagg/testagg/_mapping)' -d '{  
> "testagg": {  
> "properties": {  
> "timeStamp": {  
> "format": "dateOptionalTime",  
> "type": "date"  
> },  
> "properties": {  
> "metrics": {  
> "type": "nested",  
> "properties": {  
> "name": {  
> "type": "string"  
> },  
> "ave": {  
> "type": "double"  
> }  
> }  
> }  
> }  
> }  
> }  
> }'
> 
> Thanks,  
> Krishna Raj
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/b6c9049b-8ce0-4478-a954-adf89052b6e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b6c9049b-8ce0-4478-a954-adf89052b6e0%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/b6c9049b-8ce0-4478-a954-adf89052b6e0%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/b6c9049b-8ce0-4478-a954-adf89052b6e0%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAGmu3c0U1%3Dkzewy9LFZBx%2BrCG\_4PTYxfK9rxjc947hZXMCMFNA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGmu3c0U1%3Dkzewy9LFZBx%2BrCG_4PTYxfK9rxjc947hZXMCMFNA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Krishna\_Raj](https://avatars.discourse-cdn.com/v4/letter/k/9de053/32.png) [@Krishna\_Raj](https://discuss.elastic.co/u/Krishna_Raj)\
**Post date:** [January 12, 2015, 6:11am UTC](https://discuss.elastic.co/t/crying-for-help-mapperparsingexception-when-trying-to-create-index-with-mapping/21512/3 "2015-01-12T06:11:57Z")

</div>

Hi Masaru,

Thank You.

It did not work. Because we were using 1.3.x version of elasticsearch and  
there is bug for solaris for mapping nested object.

I upgraded ES and the mapping is good now.

Thanks,  
Krishna Raj

On Tuesday, January 6, 2015 at 2:00:01 PM UTC-8, Krishna Raj wrote:

> Hi,
> 
> I am trying to create an index with mapping which contains nested object.  
> I also tried to update the mapping of an empty created index with the same  
> below mapping which contains nested object.
> 
> But I am getting MapperParsingException error all time. My cluster goes  
> down and recoveres automatically. I am banging my head on this for last 1  
> week with no help.
> 
> Any help is greatly appreciated.
> 
> Reference:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html)
> 
> \*My Sample JSON: \*
> 
> {  
> "timeStamp": "2014-12-31T19:15:45.000+0000",  
> "metrics": [  
> {  
> "name": "viewList",  
> "ave": 10.5  
> },  
> {  
> "name": "checkout",  
> "ave": 20.5  
> },  
> {  
> "name": "login",  
> "ave": 30.5  
> },  
> {  
> "name": "logout",  
> "ave": 40.5  
> }  
> ]  
> }
> 
> _Mapping I am trying:_
> 
> curl -XPUT '[http://myhost:9201/testagg/testagg/\_mapping](http://myhost:9201/testagg/testagg/_mapping)' -d '{  
> "testagg": {  
> "properties": {  
> "timeStamp": {  
> "format": "dateOptionalTime",  
> "type": "date"  
> },  
> "properties": {  
> "metrics": {  
> "type": "nested",  
> "properties": {  
> "name": {  
> "type": "string"  
> },  
> "ave": {  
> "type": "double"  
> }  
> }  
> }  
> }  
> }  
> }  
> }'
> 
> Thanks,  
> Krishna Raj

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8503d1a7-b951-4550-9da5-a21a519a59f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8503d1a7-b951-4550-9da5-a21a519a59f9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 6, 2017, 12:39am UTC](https://discuss.elastic.co/t/crying-for-help-mapperparsingexception-when-trying-to-create-index-with-mapping/21512/4 "2017-07-06T00:39:37Z")

</div>


