# Validating Mapping

**URL:** <https://discuss.elastic.co/t/validating-mapping/21159>\
**Category:** Elasticsearch\
**Created:** [December 9, 2014, 1:44am UTC](https://discuss.elastic.co/t/validating-mapping/21159 "2014-12-09T01:44:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timothy\_Ngo](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@Timothy\_Ngo](https://discuss.elastic.co/u/Timothy_Ngo)\
**Post date:** [December 9, 2014, 1:44am UTC](https://discuss.elastic.co/t/validating-mapping/21159/1 "2014-12-09T01:44:50Z")

</div>

Hi all,

I've been trying to clean out the corner cases out of my code in  
elasticsearch, but I'm having a problem with mappings. Is there a function  
within the API which checks if a given Json is a valid mapping without  
calling the REST client?

I find that I get UncategorizedExecutionExceptions when I put certain  
invalid mappings like  
{  
"properties": "string"  
}

I'd like to avoid catching this exception class if possible so that  
debugging is easier since the exception fairly general. I was thinking a  
mapping validator would solve the problem, but I'm definitely fine with  
implementing other solutions if they are available.

Any help would be appreciated.

Thanks,  
Timothy

--  
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/b2d4499e-d792-4358-96fe-ae13ceff4f35%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b2d4499e-d792-4358-96fe-ae13ceff4f35%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:44am UTC](https://discuss.elastic.co/t/validating-mapping/21159/2 "2017-07-06T00:44:46Z")

</div>


