# Config mappings not working

**URL:** <https://discuss.elastic.co/t/config-mappings-not-working/14839>\
**Category:** Elasticsearch\
**Created:** [December 12, 2013, 4:05pm UTC](https://discuss.elastic.co/t/config-mappings-not-working/14839 "2013-12-12T16:05:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex\_Bilbie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_bilbie/32/1914_2.png) [@Alex\_Bilbie](https://discuss.elastic.co/u/Alex_Bilbie)\
**Post date:** [December 12, 2013, 4:05pm UTC](https://discuss.elastic.co/t/config-mappings-not-working/14839/1 "2013-12-12T16:05:22Z")

</div>

Hello,

I am trying to use config mappings as described here

- [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-conf-mappings.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-conf-mappings.html)

I have got a json file that has the mapping for a type called "session"  
which I want to automatically be used for an index called "sessions"

My elasticsearch.yml file is located at `/etc/elasticsearch`, so as  
described in the linked site I have put the session.json at  
`/etc/elasticsearch/config/mappings/sessions/session.json`

When I run `curl -XPUT 'http://localhost:9200/sessions/'` and look at  
[http://localhost:9200/sessions/\_mapping](http://localhost:9200/sessions/_mapping) however there isn't a mapping  
defined for the type "session"

What am I doing wrong?

Thank you

Alex

--  
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/f9b903fb-f473-4e0f-8a2c-56a912726602%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f9b903fb-f473-4e0f-8a2c-56a912726602%40googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [December 13, 2013, 3:14pm UTC](https://discuss.elastic.co/t/config-mappings-not-working/14839/2 "2013-12-13T15:14:11Z")

</div>

Hey,

hard to tell without seeing the file you put there. In general I would not  
use the mapping functionality via files, but switch to using index  
templates. The reason for this, that you do not have to copy your mapping  
files over, when you create and fireup a new node, but you only have to add  
it your cluster.

if you still think, this is a bug, please create a github issue, so we can  
reproduce it completely.

--Alex

On Thu, Dec 12, 2013 at 5:05 PM, Alex Bilbie [hello@alexbilbie.com](mailto:hello@alexbilbie.com) wrote:

> Hello,
> 
> I am trying to use config mappings as described here -  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-conf-mappings.html)
> 
> I have got a json file that has the mapping for a type called "session"  
> which I want to automatically be used for an index called "sessions"
> 
> My elasticsearch.yml file is located at `/etc/elasticsearch`, so as  
> described in the linked site I have put the session.json at  
> `/etc/elasticsearch/config/mappings/sessions/session.json`
> 
> When I run `curl -XPUT 'http://localhost:9200/sessions/'`[http://localhost:9200/sessions/'](http://localhost:9200/sessions/')and look at  
> [http://localhost:9200/sessions/\_mapping](http://localhost:9200/sessions/_mapping) however there isn't a mapping  
> defined for the type "session"
> 
> What am I doing wrong?
> 
> Thank you
> 
> Alex
> 
> --  
> 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/f9b903fb-f473-4e0f-8a2c-56a912726602%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f9b903fb-f473-4e0f-8a2c-56a912726602%40googlegroups.com)  
> .  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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/CAGCwEM8rN1zDDaCP-27XyGA\_M8dyoFhz%3Dnti2ZZTzDeVGb1xqw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAGCwEM8rN1zDDaCP-27XyGA_M8dyoFhz%3Dnti2ZZTzDeVGb1xqw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<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:01am UTC](https://discuss.elastic.co/t/config-mappings-not-working/14839/3 "2017-07-06T02:01:21Z")

</div>


