# Mapper Parsing Exception

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception/270050>\
**Category:** Elasticsearch\
**Created:** [April 13, 2021, 6:17pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/270050 "2021-04-13T18:17:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hussshe](https://avatars.discourse-cdn.com/v4/letter/h/7cd45c/32.png) [@hussshe](https://discuss.elastic.co/u/hussshe)\
**Post date:** [April 13, 2021, 6:17pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/270050/1 "2021-04-13T18:17:55Z")

</div>

Hello,

I am trying to add mappings to the index named ecommerce. But this throws "mapper\_parsing\_exception" error.

Any help on rectifying this error would be appreciated. Elastic Search version is 7.12.0

PUT /ecommerce  
{  
"mappings":{  
"product":{  
"properties":{  
"name": {  
"type": "string"  
},  
"price":{  
"type": "double"  
},  
"description":{  
"type": "string"  
},  
"status":{  
"type": "string"  
},  
"quantity":{  
"type":"integer"  
},  
"categories":{  
"type": "nested",  
"properties":{  
"name":{  
"type": "string"  
}  
}  
},  
"tags":{  
"type":"string"  
}  
}  
}  
}  
}

Error is as follows

{  
"error" : {  
"root\_cause" : [  
{  
"type" : "mapper\_parsing\_exception",  
"reason" : "Root mapping definition has unsupported parameters: [product : {properties={quantity={type=integer}, price={type=double}, name={type=string}, description={type=string}, categories={type=nested, properties={name={type=string}}}, status={type=string}, tags={type=string}}}]"  
}  
],  
"type" : "mapper\_parsing\_exception",  
"reason" : "Failed to parse mapping [\_doc]: Root mapping definition has unsupported parameters: [product : {properties={quantity={type=integer}, price={type=double}, name={type=string}, description={type=string}, categories={type=nested, properties={name={type=string}}}, status={type=string}, tags={type=string}}}]",  
"caused\_by" : {  
"type" : "mapper\_parsing\_exception",  
"reason" : "Root mapping definition has unsupported parameters: [product : {properties={quantity={type=integer}, price={type=double}, name={type=string}, description={type=string}, categories={type=nested, properties={name={type=string}}}, status={type=string}, tags={type=string}}}]"  
}  
},  
"status" : 400  
}

---

<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:** [April 13, 2021, 7:29pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/270050/2 "2021-04-13T19:29:57Z")

</div>

Your mapping was for older versions like 5.x.

Lot of things changed since then.  
Where is this coming from?

---

<div class="post-metadata">

**Author:** ![hussshe](https://avatars.discourse-cdn.com/v4/letter/h/7cd45c/32.png) [@hussshe](https://discuss.elastic.co/u/hussshe)\
**Post date:** [April 18, 2021, 6:35pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/270050/3 "2021-04-18T18:35:22Z")

</div>

Thanks for replying back, David. This helps!! I was just watching elastic search youtube course that was uploaded 5 years ago and was using mapping of older version in new version of ES.

---

<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:** [May 16, 2021, 6:35pm UTC](https://discuss.elastic.co/t/mapper-parsing-exception/270050/4 "2021-05-16T18:35:38Z")

</div>

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