# Validating mapping file

**URL:** <https://discuss.elastic.co/t/validating-mapping-file/10132>\
**Category:** Elasticsearch\
**Created:** [December 20, 2012, 9:33am UTC](https://discuss.elastic.co/t/validating-mapping-file/10132 "2012-12-20T09:33:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Himanshu\_Gupta](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@Himanshu\_Gupta](https://discuss.elastic.co/u/Himanshu_Gupta)\
**Post date:** [December 20, 2012, 9:33am UTC](https://discuss.elastic.co/t/validating-mapping-file/10132/1 "2012-12-20T09:33:41Z")

</div>

Hi,  
I wanted to know if we have any way to check if any mapping file is present  
or not in specified location for elastic search.  
apart from that can we validate mapping json, if it correct or not.

-Himanshu

--

---

<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:** [December 20, 2012, 10:01am UTC](https://discuss.elastic.co/t/validating-mapping-file/10132/2 "2012-12-20T10:01:33Z")

</div>

sorry but I don't understand very well your use case or what you are looking  
for.  
But, let me say that if you are using Java, you can have a look at the spring  
factories project for elasticsearch :

> **[GitHub - dadoonet/spring-elasticsearch: Spring factories for elasticsearch](https://github.com/dadoonet/spring-elasticsearch)**
>
> Spring factories for elasticsearch. Contribute to dadoonet/spring-elasticsearch development by creating an account on GitHub.

You can have mapping files in your classpath and each time you start a node the  
factory will check if your mapping already exists or not and push it if needed.

Not sure it helps here...

Le 20 décembre 2012 à 10:33, Himanshu Gupta [himanshu.iit@gmail.com](mailto:himanshu.iit@gmail.com) a écrit :

> Hi,  
> I wanted to know if we have any way to check if any mapping file is present  
> or not in specified location for Elasticsearch.  
> apart from that can we validate mapping json, if it correct or not.
> 
> -Himanshu
> 
> --

--  
David Pilato  
[http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
[http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

--

---

<div class="post-metadata">

**Author:** ![Himanshu\_Gupta](https://avatars.discourse-cdn.com/v4/letter/h/a88e4f/32.png) [@Himanshu\_Gupta](https://discuss.elastic.co/u/Himanshu_Gupta)\
**Post date:** [December 20, 2012, 10:33am UTC](https://discuss.elastic.co/t/validating-mapping-file/10132/3 "2012-12-20T10:33:18Z")

</div>

Hi David,

Actually we are adding mapping file which will help ES to determine correct  
data type for field, instead of relying on ES to evaluate data type. We  
want to make sure that mapping file added in $ES\_HOME/config/mapping is  
being used and is valid. mapping file is invalid in cases where I fotgor to  
mention type (data type) for a field or I might have given wrong data type  
which ES does not understand. I want to validate without starting ES  
deployment.

Regards,  
Himanshu

On Thu, Dec 20, 2012 at 3:31 PM, David Pilato [david@pilato.fr](mailto:david@pilato.fr) wrote:

> \*\*  
> sorry but I don't understand very well your use case or what you are  
> looking for.  
> But, let me say that if you are using Java, you can have a look at the  
> spring factories project for elasticsearch :  
> [GitHub - dadoonet/spring-elasticsearch: Spring factories for elasticsearch](https://github.com/dadoonet/spring-elasticsearch)
> 
> You can have mapping files in your classpath and each time you start a  
> node the factory will check if your mapping already exists or not and push  
> it if needed.
> 
> Not sure it helps here...
> 
> Le 20 décembre 2012 à 10:33, Himanshu Gupta [himanshu.iit@gmail.com](mailto:himanshu.iit@gmail.com) a  
> écrit :
> 
> Hi,  
> I wanted to know if we have any way to check if any mapping file is  
> present or not in specified location for Elasticsearch.  
> apart from that can we validate mapping json, if it correct or not.
> 
> -Himanshu
> 
> --
> 
> --  
> David Pilato  
> [http://www.scrutmydocs.org/](http://www.scrutmydocs.org/)  
> [http://dev.david.pilato.fr/](http://dev.david.pilato.fr/)  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> --

--

---

<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, 2:59am UTC](https://discuss.elastic.co/t/validating-mapping-file/10132/4 "2017-07-06T02:59:09Z")

</div>


