# How to create custom mapping for the same field

**URL:** <https://discuss.elastic.co/t/how-to-create-custom-mapping-for-the-same-field/22916>\
**Category:** Elasticsearch\
**Created:** [March 26, 2015, 8:07am UTC](https://discuss.elastic.co/t/how-to-create-custom-mapping-for-the-same-field/22916 "2015-03-26T08:07:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![11182](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/11182/32/810_2.png) [@11182](https://discuss.elastic.co/u/11182)\
**Post date:** [March 26, 2015, 8:07am UTC](https://discuss.elastic.co/t/how-to-create-custom-mapping-for-the-same-field/22916/1 "2015-03-26T08:07:00Z")

</div>

When I put the following JSON to elasticsearch. It get error about nested:  
NumberFormatException  
{

"id":"eee",  
"crosstab":{

"dims":[

{

"id":1  
},  
{

"id":"asd"  
}  
]  
}  
}

I knew dims.id have different type, what should I do to avoid create index  
dim.id or create custom mapping.

--  
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/9cebbf03-09ac-4847-ab72-00c07c472e1b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/9cebbf03-09ac-4847-ab72-00c07c472e1b%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:23am UTC](https://discuss.elastic.co/t/how-to-create-custom-mapping-for-the-same-field/22916/2 "2017-07-06T00:23:49Z")

</div>

Closed on July 6, 2017, 12:23am UTC


