# Index.routing.allocation.include not working

**URL:** <https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528>\
**Category:** Elasticsearch\
**Created:** [November 21, 2013, 10:46pm UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528 "2013-11-21T22:46:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [November 21, 2013, 10:46pm UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/1 "2013-11-21T22:46:30Z")

</div>

I have 2 nodes and I created a new index and given this routing rule. Node  
1 has "node.group1 : group1" set in yaml file and Node 2 has "node.group1 :  
group2" set in the file. However, when I write data it still is getting  
writen to both the nodes. I just want it to go to only Node 2. Can I get  
some suggestions on why this might be happening?

curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
"index.routing.allocation.include.group1" : "group2",  
"index.routing.allocation.exclude.group1" : "group1"  
}'

--  
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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [November 21, 2013, 10:47pm UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/2 "2013-11-21T22:47:36Z")

</div>

Did you restart the nodes after setting that parameter in the config file?

Regards,  
Mark Walkom

Infrastructure Engineer  
Campaign Monitor  
email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
web: [www.campaignmonitor.com](http://www.campaignmonitor.com)

On 22 November 2013 09:46, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) wrote:

> I have 2 nodes and I created a new index and given this routing rule. Node  
> 1 has "node.group1 : group1" set in yaml file and Node 2 has "node.group1 :  
> group2" set in the file. However, when I write data it still is getting  
> writen to both the nodes. I just want it to go to only Node 2. Can I get  
> some suggestions on why this might be happening?
> 
> curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> "index.routing.allocation.include.group1" : "group2",  
> "index.routing.allocation.exclude.group1" : "group1"  
> }'
> 
> --  
> 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).  
> 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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [November 21, 2013, 11:00pm UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/3 "2013-11-21T23:00:39Z")

</div>

yes. And head shows this as well:

{

- name: 10.80.140.242
- transport\_address: inet[/10.80.140.242:9300]
- version: 0.90.6
- http\_address: inet[/10.80.140.242:9200]
- attributes: {
  - group1: group1  
}

}  
{

- name: 10.80.140.86
- transport\_address: inet[/10.80.140.86:9300]
- version: 0.90.6
- http\_address: inet[/10.80.140.86:9200]
- attributes: {
  - group1: group2  
}

}

{

- state: open
- settings: {
  - index.number\_of\_replicas: 1
  - index.number\_of\_shards: 5
  - index.version.created: 900699
  - index.uuid: Bqd1gRznTl6U5IUFDevLqA
  - index.routing.allocation.include.group1: group2
  - index.routing.allocation.exclude.group1: group1  
}

- mappings: { }
- aliases: 

}

On Thu, Nov 21, 2013 at 2:47 PM, Mark Walkom [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)wrote:

> Did you restart the nodes after setting that parameter in the config file?
> 
> Regards,  
> Mark Walkom
> 
> Infrastructure Engineer  
> Campaign Monitor  
> email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
> web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> 
> On 22 November 2013 09:46, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) wrote:
> 
> > I have 2 nodes and I created a new index and given this routing rule.  
> > Node 1 has "node.group1 : group1" set in yaml file and Node 2 has  
> > "node.group1 : group2" set in the file. However, when I write data it still  
> > is getting writen to both the nodes. I just want it to go to only Node 2.  
> > Can I get some suggestions on why this might be happening?
> > 
> > curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> > "index.routing.allocation.include.group1" : "group2",  
> > "index.routing.allocation.exclude.group1" : "group1"  
> > }'
> > 
> > --  
> > 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).  
> > 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).  
> 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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [November 22, 2013, 7:47pm UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/4 "2013-11-22T19:47:00Z")

</div>

I am still facing this issue and looking for suggestions.

On Thu, Nov 21, 2013 at 3:00 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:

> yes. And head shows this as well:
> 
> {
> 
> - name: 10.80.140.242
> - transport\_address: inet[/10.80.140.242:9300]
> - version: 0.90.6
> - http\_address: inet[/10.80.140.242:9200]
> - attributes: {
> - group1: group1  
> }
> 
> }  
> {
> 
> - name: 10.80.140.86
> - transport\_address: inet[/10.80.140.86:9300]
> - version: 0.90.6
> - http\_address: inet[/10.80.140.86:9200]
> - attributes: {
> - group1: group2  
> }
> 
> }
> 
> {
> 
> - state: open
> - settings: {
> - index.number\_of\_replicas: 1
> - index.number\_of\_shards: 5
> - index.version.created: 900699
> - index.uuid: Bqd1gRznTl6U5IUFDevLqA
> - index.routing.allocation.include.group1: group2
> - index.routing.allocation.exclude.group1: group1  
> }
> 
> - mappings: { }
> - aliases: 
> 
> }
> 
> On Thu, Nov 21, 2013 at 2:47 PM, Mark Walkom [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)wrote:
> 
> > Did you restart the nodes after setting that parameter in the config file?
> > 
> > Regards,  
> > Mark Walkom
> > 
> > Infrastructure Engineer  
> > Campaign Monitor  
> > email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
> > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > 
> > On 22 November 2013 09:46, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) wrote:
> > 
> > > I have 2 nodes and I created a new index and given this routing rule.  
> > > Node 1 has "node.group1 : group1" set in yaml file and Node 2 has  
> > > "node.group1 : group2" set in the file. However, when I write data it still  
> > > is getting writen to both the nodes. I just want it to go to only Node 2.  
> > > Can I get some suggestions on why this might be happening?
> > > 
> > > curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> > > "index.routing.allocation.include.group1" : "group2",  
> > > "index.routing.allocation.exclude.group1" : "group1"  
> > > }'
> > > 
> > > --  
> > > 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).  
> > > 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).  
> > 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).  
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:** [November 23, 2013, 6:10am UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/5 "2013-11-23T06:10:12Z")

</div>

Hey,

if you could include a fully fledged example of what you did, including  
your configuration changes and all the curl commands you executed, this  
would help people to debug your problem, see

> **[Elasticsearch Platform — Find real-time answers at scale](https://www.elastic.co)**
>
> Power insights and outcomes with the Elasticsearch Platform and AI. See into your data and find answers that matter with enterprise solutions designed to help you build, observe, and protect. Try Elasticsearch free today.

Thanks!

--Alex

On Fri, Nov 22, 2013 at 8:47 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:

> I am still facing this issue and looking for suggestions.
> 
> On Thu, Nov 21, 2013 at 3:00 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> 
> > yes. And head shows this as well:
> > 
> > {
> > 
> > - name: 10.80.140.242
> > - transport\_address: inet[/10.80.140.242:9300]
> > - version: 0.90.6
> > - http\_address: inet[/10.80.140.242:9200]
> > - attributes: {
> > - group1: group1  
> > }
> > 
> > }  
> > {
> > 
> > - name: 10.80.140.86
> > - transport\_address: inet[/10.80.140.86:9300]
> > - version: 0.90.6
> > - http\_address: inet[/10.80.140.86:9200]
> > - attributes: {
> > - group1: group2  
> > }
> > 
> > }
> > 
> > {
> > 
> > - state: open
> > - settings: {
> > - index.number\_of\_replicas: 1
> > - index.number\_of\_shards: 5
> > - index.version.created: 900699
> > - index.uuid: Bqd1gRznTl6U5IUFDevLqA
> > - index.routing.allocation.include.group1: group2
> > - index.routing.allocation.exclude.group1: group1  
> > }
> > 
> > - mappings: { }
> > - aliases: 
> > 
> > }
> > 
> > On Thu, Nov 21, 2013 at 2:47 PM, Mark Walkom [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)wrote:
> > 
> > > Did you restart the nodes after setting that parameter in the config  
> > > file?
> > > 
> > > Regards,  
> > > Mark Walkom
> > > 
> > > Infrastructure Engineer  
> > > Campaign Monitor  
> > > email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
> > > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > > 
> > > On 22 November 2013 09:46, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com) wrote:
> > > 
> > > > I have 2 nodes and I created a new index and given this routing rule.  
> > > > Node 1 has "node.group1 : group1" set in yaml file and Node 2 has  
> > > > "node.group1 : group2" set in the file. However, when I write data it still  
> > > > is getting writen to both the nodes. I just want it to go to only Node 2.  
> > > > Can I get some suggestions on why this might be happening?
> > > > 
> > > > curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> > > > "index.routing.allocation.include.group1" : "group2",  
> > > > "index.routing.allocation.exclude.group1" : "group1"  
> > > > }'
> > > > 
> > > > --  
> > > > 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).  
> > > > 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).  
> > > 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).  
> 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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [November 25, 2013, 3:01am UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/6 "2013-11-25T03:01:55Z")

</div>

I added to the yaml file for node .86. I only want this index to be stored  
on .86 node but it also is getting stored in .242 node. I have 2 nodes so  
far.

node.group1: group2

Then I added this setting:

curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
"index.routing.allocation.include.group1" : "group2",  
"index.routing.allocation.exclude.group1" : "group1"  
}'  
Head shows this for 2 nodes:

{

- name: 10.80.140.242
- transport\_address: inet[/10.80.140.242:9300]
- version: 0.90.6
- http\_address: inet[/10.80.140.242:9200]
- attributes: {
  - group1: group1  
}

}  
{

- name: 10.80.140.86
- transport\_address: inet[/10.80.140.86:9300]
- version: 0.90.6
- http\_address: inet[/10.80.140.86:9200]
- attributes: {
  - group1: group2  
}

}  
{

- state: open
- settings: {
  - index.number\_of\_replicas: 1
  - index.number\_of\_shards: 5
  - index.version.created: 900699
  - index.uuid: Bqd1gRznTl6U5IUFDevLqA
  - index.routing.allocation.include.group1: group2
  - index.routing.allocation.exclude.group1: group1  
}

- mappings: { }
- aliases: 

}

On Fri, Nov 22, 2013 at 10:10 PM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de)wrote:

> Hey,
> 
> if you could include a fully fledged example of what you did, including  
> your configuration changes and all the curl commands you executed, this  
> would help people to debug your problem, see  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help)
> 
> Thanks!
> 
> --Alex
> 
> On Fri, Nov 22, 2013 at 8:47 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> 
> > I am still facing this issue and looking for suggestions.
> > 
> > On Thu, Nov 21, 2013 at 3:00 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > 
> > > yes. And head shows this as well:
> > > 
> > > {
> > > 
> > > - name: 10.80.140.242
> > > - transport\_address: inet[/10.80.140.242:9300]
> > > - version: 0.90.6
> > > - http\_address: inet[/10.80.140.242:9200]
> > > - attributes: {
> > > - group1: group1  
> > > }
> > > 
> > > }  
> > > {
> > > 
> > > - name: 10.80.140.86
> > > - transport\_address: inet[/10.80.140.86:9300]
> > > - version: 0.90.6
> > > - http\_address: inet[/10.80.140.86:9200]
> > > - attributes: {
> > > - group1: group2  
> > > }
> > > 
> > > }
> > > 
> > > {
> > > 
> > > - state: open
> > > - settings: {
> > > - index.number\_of\_replicas: 1
> > > - index.number\_of\_shards: 5
> > > - index.version.created: 900699
> > > - index.uuid: Bqd1gRznTl6U5IUFDevLqA
> > > - index.routing.allocation.include.group1: group2
> > > - index.routing.allocation.exclude.group1: group1  
> > > }
> > > 
> > > - mappings: { }
> > > - aliases: 
> > > 
> > > }
> > > 
> > > On Thu, Nov 21, 2013 at 2:47 PM, Mark Walkom [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)wrote:
> > > 
> > > > Did you restart the nodes after setting that parameter in the config  
> > > > file?
> > > > 
> > > > Regards,  
> > > > Mark Walkom
> > > > 
> > > > Infrastructure Engineer  
> > > > Campaign Monitor  
> > > > email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
> > > > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > > > 
> > > > On 22 November 2013 09:46, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > > > 
> > > > > I have 2 nodes and I created a new index and given this routing rule.  
> > > > > Node 1 has "node.group1 : group1" set in yaml file and Node 2 has  
> > > > > "node.group1 : group2" set in the file. However, when I write data it still  
> > > > > is getting writen to both the nodes. I just want it to go to only Node 2.  
> > > > > Can I get some suggestions on why this might be happening?
> > > > > 
> > > > > curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> > > > > "index.routing.allocation.include.group1" : "group2",  
> > > > > "index.routing.allocation.exclude.group1" : "group1"  
> > > > > }'
> > > > > 
> > > > > --  
> > > > > 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).  
> > > > > 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).  
> > > > 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).  
> > 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).  
> 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).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![Mohit\_Anchlia](https://avatars.discourse-cdn.com/v4/letter/m/848f3c/32.png) [@Mohit\_Anchlia](https://discuss.elastic.co/u/Mohit_Anchlia)\
**Post date:** [November 28, 2013, 12:01am UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/7 "2013-11-28T00:01:02Z")

</div>

I am still looking for suggestions.

On Sun, Nov 24, 2013 at 7:01 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:

> I added to the yaml file for node .86. I only want this index to be stored  
> on .86 node but it also is getting stored in .242 node. I have 2 nodes so  
> far.
> 
> node.group1: group2
> 
> Then I added this setting:
> 
> curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> "index.routing.allocation.include.group1" : "group2",  
> "index.routing.allocation.exclude.group1" : "group1"  
> }'  
> Head shows this for 2 nodes:
> 
> {
> 
> - name: 10.80.140.242
> - transport\_address: inet[/10.80.140.242:9300]
> - version: 0.90.6
> - http\_address: inet[/10.80.140.242:9200]
> - attributes: {
> - group1: group1  
> }
> 
> }  
> {
> 
> - name: 10.80.140.86
> - transport\_address: inet[/10.80.140.86:9300]
> - version: 0.90.6
> - http\_address: inet[/10.80.140.86:9200]
> - attributes: {
> - group1: group2  
> }
> 
> }  
> {
> 
> - state: open
> - settings: {
> - index.number\_of\_replicas: 1
> - index.number\_of\_shards: 5
> - index.version.created: 900699
> - index.uuid: Bqd1gRznTl6U5IUFDevLqA
> - index.routing.allocation.include.group1: group2
> - index.routing.allocation.exclude.group1: group1  
> }
> 
> - mappings: { }
> - aliases: 
> 
> }
> 
> On Fri, Nov 22, 2013 at 10:10 PM, Alexander Reelsen [alr@spinscale.de](mailto:alr@spinscale.de)wrote:
> 
> > Hey,
> > 
> > if you could include a fully fledged example of what you did, including  
> > your configuration changes and all the curl commands you executed, this  
> > would help people to debug your problem, see  
> > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help)
> > 
> > Thanks!
> > 
> > --Alex
> > 
> > On Fri, Nov 22, 2013 at 8:47 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > 
> > > I am still facing this issue and looking for suggestions.
> > > 
> > > On Thu, Nov 21, 2013 at 3:00 PM, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > > 
> > > > yes. And head shows this as well:
> > > > 
> > > > {
> > > > 
> > > > - name: 10.80.140.242
> > > > - transport\_address: inet[/10.80.140.242:9300]
> > > > - version: 0.90.6
> > > > - http\_address: inet[/10.80.140.242:9200]
> > > > - attributes: {
> > > > - group1: group1  
> > > > }
> > > > 
> > > > }  
> > > > {
> > > > 
> > > > - name: 10.80.140.86
> > > > - transport\_address: inet[/10.80.140.86:9300]
> > > > - version: 0.90.6
> > > > - http\_address: inet[/10.80.140.86:9200]
> > > > - attributes: {
> > > > - group1: group2  
> > > > }
> > > > 
> > > > }
> > > > 
> > > > {
> > > > 
> > > > - state: open
> > > > - settings: {
> > > > - index.number\_of\_replicas: 1
> > > > - index.number\_of\_shards: 5
> > > > - index.version.created: 900699
> > > > - index.uuid: Bqd1gRznTl6U5IUFDevLqA
> > > > - index.routing.allocation.include.group1: group2
> > > > - index.routing.allocation.exclude.group1: group1  
> > > > }
> > > > 
> > > > - mappings: { }
> > > > - aliases: 
> > > > 
> > > > }
> > > > 
> > > > On Thu, Nov 21, 2013 at 2:47 PM, Mark Walkom \<[markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)
> > > > 
> > > > > wrote:
> > > > 
> > > > > Did you restart the nodes after setting that parameter in the config  
> > > > > file?
> > > > > 
> > > > > Regards,  
> > > > > Mark Walkom
> > > > > 
> > > > > Infrastructure Engineer  
> > > > > Campaign Monitor  
> > > > > email: [markw@campaignmonitor.com](mailto:markw@campaignmonitor.com)  
> > > > > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > > > > 
> > > > > On 22 November 2013 09:46, Mohit Anchlia [mohitanchlia@gmail.com](mailto:mohitanchlia@gmail.com)wrote:
> > > > > 
> > > > > > I have 2 nodes and I created a new index and given this routing rule.  
> > > > > > Node 1 has "node.group1 : group1" set in yaml file and Node 2 has  
> > > > > > "node.group1 : group2" set in the file. However, when I write data it still  
> > > > > > is getting writen to both the nodes. I just want it to go to only Node 2.  
> > > > > > Can I get some suggestions on why this might be happening?
> > > > > > 
> > > > > > curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> > > > > > "index.routing.allocation.include.group1" : "group2",  
> > > > > > "index.routing.allocation.exclude.group1" : "group1"  
> > > > > > }'
> > > > > > 
> > > > > > --  
> > > > > > 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).  
> > > > > > 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).  
> > > > > 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).  
> > > 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).  
> > 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/CAOT3TWozXDEPH0f5VvCkc0icSwtV-r30NGR8L5ha8LedsduEPw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAOT3TWozXDEPH0f5VvCkc0icSwtV-r30NGR8L5ha8LedsduEPw%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:** ![hrishikesh\_prabhune](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hrishikesh\_prabhune](https://discuss.elastic.co/u/hrishikesh_prabhune)\
**Post date:** [December 5, 2013, 5:36pm UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/8 "2013-12-05T17:36:42Z")

</div>

Wow this is really weird . Actually I was also facing the same problem some  
time back. But it got solved by playing around with ira.exclude.\* and  
ira.require.\* setting. Here are some things you can try. I can't guarantee  
that it will work.  
I think you should just have index.routing.allocation.exclude.group1:  
group1 in the settings of the test4 index. Also see if you can set the  
value of the node attribute (key) to something else than group1.

Also, are you using any cluster routing awareness setting in your  
elasticsearch.yml file ?  
Let me know how it goes!

Cheers!

On Wednesday, November 27, 2013 4:01:02 PM UTC-8, Mo wrote:

> I am still looking for suggestions.
> 
> On Sun, Nov 24, 2013 at 7:01 PM, Mohit Anchlia \<[mohita...@gmail.com](mailto:mohita...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > I added to the yaml file for node .86. I only want this index to be  
> > stored on .86 node but it also is getting stored in .242 node. I have 2  
> > nodes so far.
> > 
> > node.group1: group2
> > 
> > Then I added this setting:
> > 
> > curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> > "index.routing.allocation.include.group1" : "group2",  
> > "index.routing.allocation.exclude.group1" : "group1"  
> > }'  
> > Head shows this for 2 nodes:
> > 
> > {
> > 
> > - name: 10.80.140.242
> > - transport\_address: inet[/10.80.140.242:9300]
> > - version: 0.90.6
> > - http\_address: inet[/10.80.140.242:9200]
> > - attributes: {
> > - group1: group1  
> > }
> > 
> > }  
> > {
> > 
> > - name: 10.80.140.86
> > - transport\_address: inet[/10.80.140.86:9300]
> > - version: 0.90.6
> > - http\_address: inet[/10.80.140.86:9200]
> > - attributes: {
> > - group1: group2  
> > }
> > 
> > }  
> > {
> > 
> > - state: open
> > - settings: {
> > - index.number\_of\_replicas: 1
> > - index.number\_of\_shards: 5
> > - index.version.created: 900699
> > - index.uuid: Bqd1gRznTl6U5IUFDevLqA
> > - index.routing.allocation.include.group1: group2
> > - index.routing.allocation.exclude.group1: group1  
> > }
> > 
> > - mappings: { }
> > - aliases: 
> > 
> > }
> > 
> > On Fri, Nov 22, 2013 at 10:10 PM, Alexander Reelsen \<[a...@spinscale.de](mailto:a...@spinscale.de)\<javascript:\>
> > 
> > > wrote:
> > 
> > > Hey,
> > > 
> > > if you could include a fully fledged example of what you did, including  
> > > your configuration changes and all the curl commands you executed, this  
> > > would help people to debug your problem, see  
> > > [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/help)
> > > 
> > > Thanks!
> > > 
> > > --Alex
> > > 
> > > On Fri, Nov 22, 2013 at 8:47 PM, Mohit Anchlia \<[mohita...@gmail.com](mailto:mohita...@gmail.com)\<javascript:\>
> > > 
> > > > wrote:
> > > 
> > > > I am still facing this issue and looking for suggestions.
> > > > 
> > > > On Thu, Nov 21, 2013 at 3:00 PM, Mohit Anchlia \<[mohita...@gmail.com](mailto:mohita...@gmail.com)\<javascript:\>
> > > > 
> > > > > wrote:
> > > > 
> > > > > yes. And head shows this as well:
> > > > > 
> > > > > {
> > > > > 
> > > > > - name: 10.80.140.242
> > > > > - transport\_address: inet[/10.80.140.242:9300]
> > > > > - version: 0.90.6
> > > > > - http\_address: inet[/10.80.140.242:9200]
> > > > > - attributes: {
> > > > > - group1: group1  
> > > > > }
> > > > > 
> > > > > }  
> > > > > {
> > > > > 
> > > > > - name: 10.80.140.86
> > > > > - transport\_address: inet[/10.80.140.86:9300]
> > > > > - version: 0.90.6
> > > > > - http\_address: inet[/10.80.140.86:9200]
> > > > > - attributes: {
> > > > > - group1: group2  
> > > > > }
> > > > > 
> > > > > }
> > > > > 
> > > > > {
> > > > > 
> > > > > - state: open
> > > > > - settings: {
> > > > > - index.number\_of\_replicas: 1
> > > > > - index.number\_of\_shards: 5
> > > > > - index.version.created: 900699
> > > > > - index.uuid: Bqd1gRznTl6U5IUFDevLqA
> > > > > - index.routing.allocation.include.group1: group2
> > > > > - index.routing.allocation.exclude.group1: group1  
> > > > > }
> > > > > 
> > > > > - mappings: { }
> > > > > - aliases: 
> > > > > 
> > > > > }
> > > > > 
> > > > > On Thu, Nov 21, 2013 at 2:47 PM, Mark Walkom \<  
> > > > > [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>\> wrote:
> > > > > 
> > > > > > Did you restart the nodes after setting that parameter in the config  
> > > > > > file?
> > > > > > 
> > > > > > Regards,  
> > > > > > Mark Walkom
> > > > > > 
> > > > > > Infrastructure Engineer  
> > > > > > Campaign Monitor  
> > > > > > email: [ma...@campaignmonitor.com](mailto:ma...@campaignmonitor.com) \<javascript:\>  
> > > > > > web: [www.campaignmonitor.com](http://www.campaignmonitor.com)
> > > > > > 
> > > > > > On 22 November 2013 09:46, Mohit Anchlia \<[mohita...@gmail.com](mailto:mohita...@gmail.com)\<javascript:\>
> > > > > > 
> > > > > > > wrote:
> > > > > > 
> > > > > > > I have 2 nodes and I created a new index and given this routing  
> > > > > > > rule. Node 1 has "node.group1 : group1" set in yaml file and Node 2 has  
> > > > > > > "node.group1 : group2" set in the file. However, when I write data it still  
> > > > > > > is getting writen to both the nodes. I just want it to go to only Node 2.  
> > > > > > > Can I get some suggestions on why this might be happening?
> > > > > > > 
> > > > > > > curl -XPUT 10.80.140.86:9200/test4/\_settings -d '{  
> > > > > > > "index.routing.allocation.include.group1" : "group2",  
> > > > > > > "index.routing.allocation.exclude.group1" : "group1"  
> > > > > > > }'
> > > > > > > 
> > > > > > > --  
> > > > > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > 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/548b5cd5-f270-4482-8a74-c81d4df62c39%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/548b5cd5-f270-4482-8a74-c81d4df62c39%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, 2:03am UTC](https://discuss.elastic.co/t/index-routing-allocation-include-not-working/14528/9 "2017-07-06T02:03:01Z")

</div>


