# Default-mapping.json only on master?

**URL:** <https://discuss.elastic.co/t/default-mapping-json-only-on-master/15874>\
**Category:** Elasticsearch\
**Created:** [February 18, 2014, 2:49pm UTC](https://discuss.elastic.co/t/default-mapping-json-only-on-master/15874 "2014-02-18T14:49:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brian1](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@Brian1](https://discuss.elastic.co/u/Brian1)\
**Post date:** [February 18, 2014, 2:49pm UTC](https://discuss.elastic.co/t/default-mapping-json-only-on-master/15874/1 "2014-02-18T14:49:16Z")

</div>

I am currently running 4 nodes, 3 data nodes with master=false, and 1  
master node, with data=false. When making changes to my  
default-mapping.json file, I am uncertain if I have just not done something  
right, or if I need to go put this same file on all four hosts. My setup  
currently does have this file defined on each node, so I don't know if that  
could actually cause problems if they get out of sync.

thank you!

--  
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/0cba317b-50dd-4fca-b393-48c68dea341c%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0cba317b-50dd-4fca-b393-48c68dea341c%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:** ![Brian1](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@Brian1](https://discuss.elastic.co/u/Brian1)\
**Post date:** [February 18, 2014, 3:40pm UTC](https://discuss.elastic.co/t/default-mapping-json-only-on-master/15874/2 "2014-02-18T15:40:05Z")

</div>

So I have been testing by removing a default TTL, and creating a new test  
index. It would appear that I need to remove the same line from the  
default-mapping.json on all my nodes.

So now I have to wonder if there is a better way? Having multiple nodes  
with this same file means I could easily see consistency issues if I don't  
keep them all exactly the same. If I didn't put the file on all the data  
nodes, would this not be an issue? I think I originally tried that and  
found that just the master having the file wasn't working for me.

On Tuesday, February 18, 2014 9:49:16 AM UTC-5, Brian wrote:

> I am currently running 4 nodes, 3 data nodes with master=false, and 1  
> master node, with data=false. When making changes to my  
> default-mapping.json file, I am uncertain if I have just not done something  
> right, or if I need to go put this same file on all four hosts. My setup  
> currently does have this file defined on each node, so I don't know if that  
> could actually cause problems if they get out of sync.
> 
> thank you!

--  
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/57a41650-1786-4811-a3a1-2d91f15b63dc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/57a41650-1786-4811-a3a1-2d91f15b63dc%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:** ![Binh\_Ly](https://avatars.discourse-cdn.com/v4/letter/b/ce7236/32.png) [@Binh\_Ly](https://discuss.elastic.co/u/Binh_Ly)\
**Post date:** [February 18, 2014, 7:15pm UTC](https://discuss.elastic.co/t/default-mapping-json-only-on-master/15874/3 "2014-02-18T19:15:35Z")

</div>

You might be interested in Index Templates, wherein you can alternatively  
define this default mapping dynamically at runtime to an entire cluster.  
This way, you don't have to maintain any files.

[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html)

--  
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/b5facb4a-62b9-4172-8060-f547489f69de%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/b5facb4a-62b9-4172-8060-f547489f69de%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:** ![Brian1](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@Brian1](https://discuss.elastic.co/u/Brian1)\
**Post date:** [February 19, 2014, 1:48pm UTC](https://discuss.elastic.co/t/default-mapping-json-only-on-master/15874/4 "2014-02-19T13:48:30Z")

</div>

So when done this way I can put it on the master and not all the slave  
nodes. THANK YOU! I knew there had to be something better than what I was  
doing. Plus this looks much more flexible. I saw this page before, but I  
didn't realize it for the entire cluster where as the default-mapping is  
per node.

On Tuesday, February 18, 2014 2:15:35 PM UTC-5, Binh Ly wrote:

> You might be interested in Index Templates, wherein you can alternatively  
> define this default mapping dynamically at runtime to an entire cluster.  
> This way, you don't have to maintain any files.
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-templates.html)

--  
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/0531a7b1-c0ec-4b4a-b16a-b80d1c5ba186%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/0531a7b1-c0ec-4b4a-b16a-b80d1c5ba186%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:** ![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, 1:49am UTC](https://discuss.elastic.co/t/default-mapping-json-only-on-master/15874/5 "2017-07-06T01:49:07Z")

</div>

Closed on July 6, 2017, 1:49am UTC


