# Mapper\_parsing\_exception while creating Percentage

**URL:** <https://discuss.elastic.co/t/mapper-parsing-exception-while-creating-percentage/108819>\
**Category:** Elasticsearch\
**Created:** [November 23, 2017, 4:46am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-while-creating-percentage/108819 "2017-11-23T04:46:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saafianihan](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@saafianihan](https://discuss.elastic.co/u/saafianihan)\
**Post date:** [November 23, 2017, 4:46am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-while-creating-percentage/108819/1 "2017-11-23T04:46:56Z")

</div>

When i am trying to create a column with format as Percentage it throws an error like this:

{  
"error": {  
"root\_cause": [  
{  
"type": "mapper\_parsing\_exception",  
"reason": "No handler for type [number] declared on field [fieldez\_percentage]"  
}  
],  
"type": "mapper\_parsing\_exception",  
"reason": "Failed to parse mapping [_default_]: No handler for type [number] declared on field [fieldez\_percentage]",  
"caused\_by": {  
"type": "mapper\_parsing\_exception",  
"reason": "No handler for type [number] declared on field [fieldez\_percentage]"  
}  
},  
"status": 400  
}

The code is:

PUT /average\_attendance\_dummy  
{  
"mappings": {  
"_default_": {  
"properties": {  
"fieldez\_percentage": {  
"type": "number",  
"format": "Percentage"  
}  
}  
}  
}  
}

Please help me to solve the error...

---

<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:** [November 23, 2017, 6:33am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-while-creating-percentage/108819/2 "2017-11-23T06:33:31Z")

</div>

IPlease format your code using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

There is nothing like `number` in the documentation Same for `format`. Where did you see that? See [https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/number.html)

---

<div class="post-metadata">

**Author:** ![saafianihan](https://avatars.discourse-cdn.com/v4/letter/s/839c29/32.png) [@saafianihan](https://discuss.elastic.co/u/saafianihan)\
**Post date:** [November 23, 2017, 8:03am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-while-creating-percentage/108819/3 "2017-11-23T08:03:21Z")

</div>

Actually what i want to do is i have to add one column to store percentage values always like geo\_point does. So that i am doing this. Is this way correct or not?

---

<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:** [November 23, 2017, 8:20am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-while-creating-percentage/108819/4 "2017-11-23T08:20:32Z")

</div>

No. It’s not correct. But you know that as you get an error message.

Modify your document and just store an integer which represents the percentage like 20 instead of 20%

---

<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 21, 2017, 8:20am UTC](https://discuss.elastic.co/t/mapper-parsing-exception-while-creating-percentage/108819/5 "2017-12-21T08:20:34Z")

</div>

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