# Routing not working for ES

**URL:** <https://discuss.elastic.co/t/routing-not-working-for-es/18248>\
**Category:** Elasticsearch\
**Created:** [June 22, 2014, 1:05pm UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248 "2014-06-22T13:05:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![satishmallik](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@satishmallik](https://discuss.elastic.co/u/satishmallik)\
**Post date:** [June 22, 2014, 1:05pm UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/1 "2014-06-22T13:05:33Z")

</div>

I have following ES mapping defined,

curl "localhost:9200/codeindexroute/filecontracts/\_mapping"

{  
"codeindexroute":{  
"mappings":{  
"filecontracts":{  
"\_routing":{  
"required":true  
},  
"\_source":{  
"compress":false,  
"includes":["filePath","parserType"],  
"excludes":["content"]  
},  
"properties":{  
"content":{  
"type":"string",  
"term\_vector":"with\_positions\_offsets"  
},  
"contentID":{  
"type":"string",  
"index":"not\_analyzed"  
},  
"filePath":{  
"type":"string",  
"index":"no",  
"store":true  
},  
"parserType":{  
"type":"string",  
"index":"not\_analyzed"  
}  
}  
}  
}  
}  
}

I index the doc with routing ID "abc",

curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
@data-file.json

{"\_index":"codeindexroute","\_type":"filecontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww  
","\_version":1,"created":true}

data-file.json looks as follows

{  
"content":"I am Happy",  
"contentid": "abcdedf",  
"filepath" : "\test1\test1.txt",  
"parsertype" : "txt"  
}

When I look at all contents

curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"

{  
"took" : 53,  
"timed\_out" : false,  
"\_shards" : {  
"total" : 1,  
"successful" : 1,  
"failed" : 0  
},  
"hits" : {  
"total" : 1,  
"max\_score" : 1.0,  
"hits" : [ {  
"\_index" : "codeindexroute",  
"\_type" : "filecontracts",  
"\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
"\_score" : 1.0,  
"\_source":{}  
} ]  
}  
}

curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"

{"took":63,"timed\_out":false,"\_shards":{"total":1,"successful":1,"failed":0},"hi  
ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexroute","\_type":"filec  
ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","\_score":1.0,"\_source":{}}]}}

When I am searching with routing "bbb", Ideally it should not return any  
document as I have not indexed any document with this routing ID. I have  
just indexed one document with routing id "abc".

Am I making some mistake here or, is there any issue with ES? Please have a  
look,

--  
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/83b7ac11-236e-483b-a248-221e09359755%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/83b7ac11-236e-483b-a248-221e09359755%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![satishmallik](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@satishmallik](https://discuss.elastic.co/u/satishmallik)\
**Post date:** [June 30, 2014, 7:06am UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/2 "2014-06-30T07:06:16Z")

</div>

Still waiting for a response from ES team,

On Sunday, June 22, 2014 6:35:33 PM UTC+5:30, satishmallik wrote:

> I have following ES mapping defined,
> 
> curl "localhost:9200/codeindexroute/filecontracts/\_mapping"
> 
> {  
> "codeindexroute":{  
> "mappings":{  
> "filecontracts":{  
> "\_routing":{  
> "required":true  
> },  
> "\_source":{  
> "compress":false,  
> "includes":["filePath","parserType"],  
> "excludes":["content"]  
> },  
> "properties":{  
> "content":{  
> "type":"string",  
> "term\_vector":"with\_positions\_offsets"  
> },  
> "contentID":{  
> "type":"string",  
> "index":"not\_analyzed"  
> },  
> "filePath":{  
> "type":"string",  
> "index":"no",  
> "store":true  
> },  
> "parserType":{  
> "type":"string",  
> "index":"not\_analyzed"  
> }  
> }  
> }  
> }  
> }  
> }
> 
> I index the doc with routing ID "abc",
> 
> curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> @data-file.json
> 
> {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww  
> ","\_version":1,"created":true}
> 
> data-file.json looks as follows
> 
> {  
> "content":"I am Happy",  
> "contentid": "abcdedf",  
> "filepath" : "\test1\test1.txt",  
> "parsertype" : "txt"  
> }
> 
> When I look at all contents
> 
> curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"
> 
> {  
> "took" : 53,  
> "timed\_out" : false,  
> "\_shards" : {  
> "total" : 1,  
> "successful" : 1,  
> "failed" : 0  
> },  
> "hits" : {  
> "total" : 1,  
> "max\_score" : 1.0,  
> "hits" : [ {  
> "\_index" : "codeindexroute",  
> "\_type" : "filecontracts",  
> "\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
> "\_score" : 1.0,  
> "\_source":{}  
> } ]  
> }  
> }
> 
> curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"
> 
> {"took":63,"timed\_out":false,"\_shards":{"total":1,"successful":1,"failed":0},"hi
> 
> ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexroute","\_type":"filec  
> ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","\_score":1.0,"\_source":{}}]}}
> 
> When I am searching with routing "bbb", Ideally it should not return any  
> document as I have not indexed any document with this routing ID. I have  
> just indexed one document with routing id "abc".
> 
> Am I making some mistake here or, is there any issue with ES? Please have  
> a look,

--  
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/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Himanshu\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@Himanshu\_Agrawal](https://discuss.elastic.co/u/Himanshu_Agrawal)\
**Post date:** [June 30, 2014, 8:46am UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/3 "2014-06-30T08:46:54Z")

</div>

Hi Satish,

From the requests and responses you have posted it seems that you only have  
a single shard for the index "codeindexroute". Now routing doesn't make  
sense when you have a single shard for an index because the request will be  
executed on the same shard irrespective of the routing value provided. That  
is why you are getting your document even after entering a different value  
for routing.

Thanks,  
Himanshu.

On Mon, Jun 30, 2014 at 12:36 PM, satishmallik [satishmallik@gmail.com](mailto:satishmallik@gmail.com)  
wrote:

> Still waiting for a response from ES team,
> 
> On Sunday, June 22, 2014 6:35:33 PM UTC+5:30, satishmallik wrote:
> 
> > I have following ES mapping defined,
> > 
> > curl "localhost:9200/codeindexroute/filecontracts/\_mapping"
> > 
> > {  
> > "codeindexroute":{  
> > "mappings":{  
> > "filecontracts":{  
> > "\_routing":{  
> > "required":true  
> > },  
> > "\_source":{  
> > "compress":false,  
> > "includes":["filePath","parserType"],  
> > "excludes":["content"]  
> > },  
> > "properties":{  
> > "content":{  
> > "type":"string",  
> > "term\_vector":"with\_positions\_offsets"  
> > },  
> > "contentID":{  
> > "type":"string",  
> > "index":"not\_analyzed"  
> > },  
> > "filePath":{  
> > "type":"string",  
> > "index":"no",  
> > "store":true  
> > },  
> > "parserType":{  
> > "type":"string",  
> > "index":"not\_analyzed"  
> > }  
> > }  
> > }  
> > }  
> > }  
> > }
> > 
> > I index the doc with routing ID "abc",
> > 
> > curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> > @data-file.json
> > 
> > {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"  
> > 6AOXcDl4TLWgyUnXlDUcww  
> > ","\_version":1,"created":true}
> > 
> > data-file.json looks as follows
> > 
> > {  
> > "content":"I am Happy",  
> > "contentid": "abcdedf",  
> > "filepath" : "\test1\test1.txt",  
> > "parsertype" : "txt"  
> > }
> > 
> > When I look at all contents
> > 
> > curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"
> > 
> > {  
> > "took" : 53,  
> > "timed\_out" : false,  
> > "\_shards" : {  
> > "total" : 1,  
> > "successful" : 1,  
> > "failed" : 0  
> > },  
> > "hits" : {  
> > "total" : 1,  
> > "max\_score" : 1.0,  
> > "hits" : [ {  
> > "\_index" : "codeindexroute",  
> > "\_type" : "filecontracts",  
> > "\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
> > "\_score" : 1.0,  
> > "\_source":{}  
> > } ]  
> > }  
> > }
> > 
> > curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"
> > 
> > {"took":63,"timed\_out":false,"\_shards":{"total":1,"  
> > successful":1,"failed":0},"hi  
> > ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"  
> > codeindexroute","\_type":"filec  
> > ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","\_score":1.0,"\_source":{}}]}}
> > 
> > When I am searching with routing "bbb", Ideally it should not return any  
> > document as I have not indexed any document with this routing ID. I have  
> > just indexed one document with routing id "abc".
> > 
> > Am I making some mistake here or, is there any issue with ES? Please have  
> > a look,
> 
> --  
> 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/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CACTSS%3D7%3D9htH%2BpzQC7hU0r-spRiY%2B%2B-kpHOLe5%2BQpnKS7zimpg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACTSS%3D7%3D9htH%2BpzQC7hU0r-spRiY%2B%2B-kpHOLe5%2BQpnKS7zimpg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![satishmallik](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@satishmallik](https://discuss.elastic.co/u/satishmallik)\
**Post date:** [June 30, 2014, 11:34am UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/4 "2014-06-30T11:34:43Z")

</div>

Hi Himanshu,  
Thnaks for your response. I have single shard in my setup. But as per ES  
documents single shard can contain multiple routes. So route and Shard  
don't have 1:1 mapping.  
I tested it on an index with multiple shards. But I am facing same issue,

Regards  
Satish

On Monday, June 30, 2014 2:17:25 PM UTC+5:30, Himanshu Agrawal wrote:

> Hi Satish,
> 
> From the requests and responses you have posted it seems that you only  
> have a single shard for the index "codeindexroute". Now routing doesn't  
> make sense when you have a single shard for an index because the request  
> will be executed on the same shard irrespective of the routing value  
> provided. That is why you are getting your document even after entering a  
> different value for routing.
> 
> Thanks,  
> Himanshu.
> 
> On Mon, Jun 30, 2014 at 12:36 PM, satishmallik \<[satish...@gmail.com](mailto:satish...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Still waiting for a response from ES team,
> > 
> > On Sunday, June 22, 2014 6:35:33 PM UTC+5:30, satishmallik wrote:
> > 
> > > I have following ES mapping defined,
> > > 
> > > curl "localhost:9200/codeindexroute/filecontracts/\_mapping"
> > > 
> > > {  
> > > "codeindexroute":{  
> > > "mappings":{  
> > > "filecontracts":{  
> > > "\_routing":{  
> > > "required":true  
> > > },  
> > > "\_source":{  
> > > "compress":false,  
> > > "includes":["filePath","parserType"],  
> > > "excludes":["content"]  
> > > },  
> > > "properties":{  
> > > "content":{  
> > > "type":"string",  
> > > "term\_vector":"with\_positions\_offsets"  
> > > },  
> > > "contentID":{  
> > > "type":"string",  
> > > "index":"not\_analyzed"  
> > > },  
> > > "filePath":{  
> > > "type":"string",  
> > > "index":"no",  
> > > "store":true  
> > > },  
> > > "parserType":{  
> > > "type":"string",  
> > > "index":"not\_analyzed"  
> > > }  
> > > }  
> > > }  
> > > }  
> > > }  
> > > }
> > > 
> > > I index the doc with routing ID "abc",
> > > 
> > > curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> > > @data-file.json
> > > 
> > > {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"  
> > > 6AOXcDl4TLWgyUnXlDUcww  
> > > ","\_version":1,"created":true}
> > > 
> > > data-file.json looks as follows
> > > 
> > > {  
> > > "content":"I am Happy",  
> > > "contentid": "abcdedf",  
> > > "filepath" : "\test1\test1.txt",  
> > > "parsertype" : "txt"  
> > > }
> > > 
> > > When I look at all contents
> > > 
> > > curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"
> > > 
> > > {  
> > > "took" : 53,  
> > > "timed\_out" : false,  
> > > "\_shards" : {  
> > > "total" : 1,  
> > > "successful" : 1,  
> > > "failed" : 0  
> > > },  
> > > "hits" : {  
> > > "total" : 1,  
> > > "max\_score" : 1.0,  
> > > "hits" : [ {  
> > > "\_index" : "codeindexroute",  
> > > "\_type" : "filecontracts",  
> > > "\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
> > > "\_score" : 1.0,  
> > > "\_source":{}  
> > > } ]  
> > > }  
> > > }
> > > 
> > > curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"
> > > 
> > > {"took":63,"timed\_out":false,"\_shards":{"total":1,"  
> > > successful":1,"failed":0},"hi  
> > > ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"  
> > > codeindexroute","\_type":"filec  
> > > ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","\_score":1.0,"\_source":{}}]}}
> > > 
> > > When I am searching with routing "bbb", Ideally it should not return any  
> > > document as I have not indexed any document with this routing ID. I have  
> > > just indexed one document with routing id "abc".
> > > 
> > > Am I making some mistake here or, is there any issue with ES? Please  
> > > have a look,
> > 
> > --  
> > 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:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Himanshu\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@Himanshu\_Agrawal](https://discuss.elastic.co/u/Himanshu_Agrawal)\
**Post date:** [June 30, 2014, 11:48am UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/5 "2014-06-30T11:48:58Z")

</div>

The way elasticsearch routing works is that it hashes the string value  
provided by you to find the shard which contains the document. If you have  
less number of shards there is a high probability of collision between  
routing values such that they point to the same shard.

Can you try with different values? Also post the output you get when you  
try these requests with multiple shards.

On Mon, Jun 30, 2014 at 5:04 PM, satishmallik [satishmallik@gmail.com](mailto:satishmallik@gmail.com)  
wrote:

> Hi Himanshu,  
> Thnaks for your response. I have single shard in my setup. But as per ES  
> documents single shard can contain multiple routes. So route and Shard  
> don't have 1:1 mapping.  
> I tested it on an index with multiple shards. But I am facing same issue,
> 
> Regards  
> Satish
> 
> On Monday, June 30, 2014 2:17:25 PM UTC+5:30, Himanshu Agrawal wrote:
> 
> > Hi Satish,
> > 
> > From the requests and responses you have posted it seems that you only  
> > have a single shard for the index "codeindexroute". Now routing doesn't  
> > make sense when you have a single shard for an index because the request  
> > will be executed on the same shard irrespective of the routing value  
> > provided. That is why you are getting your document even after entering a  
> > different value for routing.
> > 
> > Thanks,  
> > Himanshu.
> > 
> > On Mon, Jun 30, 2014 at 12:36 PM, satishmallik [satish...@gmail.com](mailto:satish...@gmail.com)  
> > wrote:
> > 
> > > Still waiting for a response from ES team,
> > > 
> > > On Sunday, June 22, 2014 6:35:33 PM UTC+5:30, satishmallik wrote:
> > > 
> > > > I have following ES mapping defined,
> > > > 
> > > > curl "localhost:9200/codeindexroute/filecontracts/\_mapping"
> > > > 
> > > > {  
> > > > "codeindexroute":{  
> > > > "mappings":{  
> > > > "filecontracts":{  
> > > > "\_routing":{  
> > > > "required":true  
> > > > },  
> > > > "\_source":{  
> > > > "compress":false,  
> > > > "includes":["filePath","parserType"],  
> > > > "excludes":["content"]  
> > > > },  
> > > > "properties":{  
> > > > "content":{  
> > > > "type":"string",  
> > > > "term\_vector":"with\_positions\_offsets"  
> > > > },  
> > > > "contentID":{  
> > > > "type":"string",  
> > > > "index":"not\_analyzed"  
> > > > },  
> > > > "filePath":{  
> > > > "type":"string",  
> > > > "index":"no",  
> > > > "store":true  
> > > > },  
> > > > "parserType":{  
> > > > "type":"string",  
> > > > "index":"not\_analyzed"  
> > > > }  
> > > > }  
> > > > }  
> > > > }  
> > > > }  
> > > > }
> > > > 
> > > > I index the doc with routing ID "abc",
> > > > 
> > > > curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> > > > @data-file.json
> > > > 
> > > > {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"6A  
> > > > OXcDl4TLWgyUnXlDUcww  
> > > > ","\_version":1,"created":true}
> > > > 
> > > > data-file.json looks as follows
> > > > 
> > > > {  
> > > > "content":"I am Happy",  
> > > > "contentid": "abcdedf",  
> > > > "filepath" : "\test1\test1.txt",  
> > > > "parsertype" : "txt"  
> > > > }
> > > > 
> > > > When I look at all contents
> > > > 
> > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"
> > > > 
> > > > {  
> > > > "took" : 53,  
> > > > "timed\_out" : false,  
> > > > "\_shards" : {  
> > > > "total" : 1,  
> > > > "successful" : 1,  
> > > > "failed" : 0  
> > > > },  
> > > > "hits" : {  
> > > > "total" : 1,  
> > > > "max\_score" : 1.0,  
> > > > "hits" : [ {  
> > > > "\_index" : "codeindexroute",  
> > > > "\_type" : "filecontracts",  
> > > > "\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
> > > > "\_score" : 1.0,  
> > > > "\_source":{}  
> > > > } ]  
> > > > }  
> > > > }
> > > > 
> > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"
> > > > 
> > > > {"took":63,"timed\_out":false,"\_shards":{"total":1,"successfu  
> > > > l":1,"failed":0},"hi  
> > > > ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexr  
> > > > oute","\_type":"filec  
> > > > ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","\_score":1.0,"\_source":{}}]}}
> > > > 
> > > > When I am searching with routing "bbb", Ideally it should not return  
> > > > any document as I have not indexed any document with this routing ID. I  
> > > > have just indexed one document with routing id "abc".
> > > > 
> > > > Am I making some mistake here or, is there any issue with ES? Please  
> > > > have a look,
> > > 
> > > --  
> > > 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).  
> > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%  
> > > [40googlegroups.com](http://40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CACTSS%3D79V9LnbdMVfkvhytJHE%3DOXXmKSZxvk7kaoFrdr%3DaBs3w%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACTSS%3D79V9LnbdMVfkvhytJHE%3DOXXmKSZxvk7kaoFrdr%3DaBs3w%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![satishmallik](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@satishmallik](https://discuss.elastic.co/u/satishmallik)\
**Post date:** [June 30, 2014, 1:11pm UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/6 "2014-06-30T13:11:55Z")

</div>

I am hitting same issue with 2 shards

curl "localhost:9200/codeindexroute/\_settings?pretty"  
{  
"codeindexroute" : {  
"settings" : {  
"index" : {  
"index" : {  
"refresh\_interval" : "-1"  
},  
"refresh\_interval" : "1000",  
"number\_of\_shards" : "2",  
"number\_of\_replicas" : "0",  
"version" : {  
"created" : "1020099"  
},  
"uuid" : "p\_8eAj0GSA-XNUWtQD6fLg"  
}  
}  
}  
}

Now I index the document

curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
@data-file.json  
{"\_index":"codeindexroute","\_type":"filecontracts","\_id":"n8-pLUU4TnS6LvhCDFIXkQ  
","\_version":1,"created":true}

curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"  
{"took":1,"timed\_out":false,"\_shards":{"total":1,"successful":1,"failed":0},"hit  
s":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexroute","\_type":"fileco  
ntracts","\_id":"n8-pLUU4TnS6LvhCDFIXkQ","\_score":1.0,"\_source":{  
"content  
":"I am Happy", "contentid": "abcdedf", "filepath" : "\test1\test1.txt",  
"parsertype" : "txt"}}]}}

IMHO If hash collision is an issue then routing cannot be used at all and  
it is not useful.It has to be definite

On Monday, June 30, 2014 5:19:40 PM UTC+5:30, Himanshu Agrawal wrote:

> The way elasticsearch routing works is that it hashes the string value  
> provided by you to find the shard which contains the document. If you have  
> less number of shards there is a high probability of collision between  
> routing values such that they point to the same shard.
> 
> Can you try with different values? Also post the output you get when you  
> try these requests with multiple shards.
> 
> On Mon, Jun 30, 2014 at 5:04 PM, satishmallik \<[satish...@gmail.com](mailto:satish...@gmail.com)  
> \<javascript:\>\> wrote:
> 
> > Hi Himanshu,  
> > Thnaks for your response. I have single shard in my setup. But as per ES  
> > documents single shard can contain multiple routes. So route and Shard  
> > don't have 1:1 mapping.  
> > I tested it on an index with multiple shards. But I am facing same issue,
> > 
> > Regards  
> > Satish
> > 
> > On Monday, June 30, 2014 2:17:25 PM UTC+5:30, Himanshu Agrawal wrote:
> > 
> > > Hi Satish,
> > > 
> > > From the requests and responses you have posted it seems that you only  
> > > have a single shard for the index "codeindexroute". Now routing doesn't  
> > > make sense when you have a single shard for an index because the request  
> > > will be executed on the same shard irrespective of the routing value  
> > > provided. That is why you are getting your document even after entering a  
> > > different value for routing.
> > > 
> > > Thanks,  
> > > Himanshu.
> > > 
> > > On Mon, Jun 30, 2014 at 12:36 PM, satishmallik [satish...@gmail.com](mailto:satish...@gmail.com)  
> > > wrote:
> > > 
> > > > Still waiting for a response from ES team,
> > > > 
> > > > On Sunday, June 22, 2014 6:35:33 PM UTC+5:30, satishmallik wrote:
> > > > 
> > > > > I have following ES mapping defined,
> > > > > 
> > > > > curl "localhost:9200/codeindexroute/filecontracts/\_mapping"
> > > > > 
> > > > > {  
> > > > > "codeindexroute":{  
> > > > > "mappings":{  
> > > > > "filecontracts":{  
> > > > > "\_routing":{  
> > > > > "required":true  
> > > > > },  
> > > > > "\_source":{  
> > > > > "compress":false,  
> > > > > "includes":["filePath","parserType"],  
> > > > > "excludes":["content"]  
> > > > > },  
> > > > > "properties":{  
> > > > > "content":{  
> > > > > "type":"string",  
> > > > > "term\_vector":"with\_positions\_offsets"  
> > > > > },  
> > > > > "contentID":{  
> > > > > "type":"string",  
> > > > > "index":"not\_analyzed"  
> > > > > },  
> > > > > "filePath":{  
> > > > > "type":"string",  
> > > > > "index":"no",  
> > > > > "store":true  
> > > > > },  
> > > > > "parserType":{  
> > > > > "type":"string",  
> > > > > "index":"not\_analyzed"  
> > > > > }  
> > > > > }  
> > > > > }  
> > > > > }  
> > > > > }  
> > > > > }
> > > > > 
> > > > > I index the doc with routing ID "abc",
> > > > > 
> > > > > curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> > > > > @data-file.json
> > > > > 
> > > > > {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"6A  
> > > > > OXcDl4TLWgyUnXlDUcww  
> > > > > ","\_version":1,"created":true}
> > > > > 
> > > > > data-file.json looks as follows
> > > > > 
> > > > > {  
> > > > > "content":"I am Happy",  
> > > > > "contentid": "abcdedf",  
> > > > > "filepath" : "\test1\test1.txt",  
> > > > > "parsertype" : "txt"  
> > > > > }
> > > > > 
> > > > > When I look at all contents
> > > > > 
> > > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"
> > > > > 
> > > > > {  
> > > > > "took" : 53,  
> > > > > "timed\_out" : false,  
> > > > > "\_shards" : {  
> > > > > "total" : 1,  
> > > > > "successful" : 1,  
> > > > > "failed" : 0  
> > > > > },  
> > > > > "hits" : {  
> > > > > "total" : 1,  
> > > > > "max\_score" : 1.0,  
> > > > > "hits" : [ {  
> > > > > "\_index" : "codeindexroute",  
> > > > > "\_type" : "filecontracts",  
> > > > > "\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
> > > > > "\_score" : 1.0,  
> > > > > "\_source":{}  
> > > > > } ]  
> > > > > }  
> > > > > }
> > > > > 
> > > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"
> > > > > 
> > > > > {"took":63,"timed\_out":false,"\_shards":{"total":1,"successfu  
> > > > > l":1,"failed":0},"hi  
> > > > > ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexr  
> > > > > oute","\_type":"filec  
> > > > > ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","_score":1.0,"_  
> > > > > source":{}}]}}
> > > > > 
> > > > > When I am searching with routing "bbb", Ideally it should not return  
> > > > > any document as I have not indexed any document with this routing ID. I  
> > > > > have just indexed one document with routing id "abc".
> > > > > 
> > > > > Am I making some mistake here or, is there any issue with ES? Please  
> > > > > have a look,
> > > > 
> > > > --  
> > > > 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).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > > 
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/f797d066-cd54-4927-9fe2-dbd945034c79%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f797d066-cd54-4927-9fe2-dbd945034c79%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Himanshu\_Agrawal](https://avatars.discourse-cdn.com/v4/letter/h/f9ae1b/32.png) [@Himanshu\_Agrawal](https://discuss.elastic.co/u/Himanshu_Agrawal)\
**Post date:** [June 30, 2014, 6:55pm UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/7 "2014-06-30T18:55:48Z")

</div>

Elasticsearch routing is definite and collision is not an issue. I think  
you don't understand the purpose of routing. The routing only decides the  
shard on which search query would be executed. So essentially both of your  
queries are being executed on the same shard because both the routing  
values points to the same shard. Routing will not filter the results from a  
shard even if they were indexed through different routing values. If you  
want to filter these document you have to use search filters.  
On Jun 30, 2014 6:54 PM, "satishmallik" [satishmallik@gmail.com](mailto:satishmallik@gmail.com) wrote:

> I am hitting same issue with 2 shards
> 
> curl "localhost:9200/codeindexroute/\_settings?pretty"  
> {  
> "codeindexroute" : {  
> "settings" : {  
> "index" : {  
> "index" : {  
> "refresh\_interval" : "-1"  
> },  
> "refresh\_interval" : "1000",  
> "number\_of\_shards" : "2",  
> "number\_of\_replicas" : "0",  
> "version" : {  
> "created" : "1020099"  
> },  
> "uuid" : "p\_8eAj0GSA-XNUWtQD6fLg"  
> }  
> }  
> }  
> }
> 
> Now I index the document
> 
> curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> @data-file.json
> 
> {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"n8-pLUU4TnS6LvhCDFIXkQ  
> ","\_version":1,"created":true}
> 
> curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"
> 
> {"took":1,"timed\_out":false,"\_shards":{"total":1,"successful":1,"failed":0},"hit
> 
> s":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexroute","\_type":"fileco  
> ntracts","\_id":"n8-pLUU4TnS6LvhCDFIXkQ","\_score":1.0,"\_source":{  
> "content  
> ":"I am Happy", "contentid": "abcdedf", "filepath" : "\test1\test1.txt",  
> "parsertype" : "txt"}}]}}
> 
> IMHO If hash collision is an issue then routing cannot be used at all and  
> it is not useful.It has to be definite
> 
> On Monday, June 30, 2014 5:19:40 PM UTC+5:30, Himanshu Agrawal wrote:
> 
> > The way elasticsearch routing works is that it hashes the string value  
> > provided by you to find the shard which contains the document. If you have  
> > less number of shards there is a high probability of collision between  
> > routing values such that they point to the same shard.
> > 
> > Can you try with different values? Also post the output you get when you  
> > try these requests with multiple shards.
> > 
> > On Mon, Jun 30, 2014 at 5:04 PM, satishmallik [satish...@gmail.com](mailto:satish...@gmail.com)  
> > wrote:
> > 
> > > Hi Himanshu,  
> > > Thnaks for your response. I have single shard in my setup. But as per ES  
> > > documents single shard can contain multiple routes. So route and Shard  
> > > don't have 1:1 mapping.  
> > > I tested it on an index with multiple shards. But I am facing same issue,
> > > 
> > > Regards  
> > > Satish
> > > 
> > > On Monday, June 30, 2014 2:17:25 PM UTC+5:30, Himanshu Agrawal wrote:
> > > 
> > > > Hi Satish,
> > > > 
> > > > From the requests and responses you have posted it seems that you only  
> > > > have a single shard for the index "codeindexroute". Now routing doesn't  
> > > > make sense when you have a single shard for an index because the request  
> > > > will be executed on the same shard irrespective of the routing value  
> > > > provided. That is why you are getting your document even after entering a  
> > > > different value for routing.
> > > > 
> > > > Thanks,  
> > > > Himanshu.
> > > > 
> > > > On Mon, Jun 30, 2014 at 12:36 PM, satishmallik [satish...@gmail.com](mailto:satish...@gmail.com)  
> > > > wrote:
> > > > 
> > > > > Still waiting for a response from ES team,
> > > > > 
> > > > > On Sunday, June 22, 2014 6:35:33 PM UTC+5:30, satishmallik wrote:
> > > > > 
> > > > > > I have following ES mapping defined,
> > > > > > 
> > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_mapping"
> > > > > > 
> > > > > > {  
> > > > > > "codeindexroute":{  
> > > > > > "mappings":{  
> > > > > > "filecontracts":{  
> > > > > > "\_routing":{  
> > > > > > "required":true  
> > > > > > },  
> > > > > > "\_source":{  
> > > > > > "compress":false,  
> > > > > > "includes":["filePath","parserType"],  
> > > > > > "excludes":["content"]  
> > > > > > },  
> > > > > > "properties":{  
> > > > > > "content":{  
> > > > > > "type":"string",  
> > > > > > "term\_vector":"with\_positions\_offsets"  
> > > > > > },  
> > > > > > "contentID":{  
> > > > > > "type":"string",  
> > > > > > "index":"not\_analyzed"  
> > > > > > },  
> > > > > > "filePath":{  
> > > > > > "type":"string",  
> > > > > > "index":"no",  
> > > > > > "store":true  
> > > > > > },  
> > > > > > "parserType":{  
> > > > > > "type":"string",  
> > > > > > "index":"not\_analyzed"  
> > > > > > }  
> > > > > > }  
> > > > > > }  
> > > > > > }  
> > > > > > }  
> > > > > > }
> > > > > > 
> > > > > > I index the doc with routing ID "abc",
> > > > > > 
> > > > > > curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> > > > > > @data-file.json
> > > > > > 
> > > > > > {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"6A  
> > > > > > OXcDl4TLWgyUnXlDUcww  
> > > > > > ","\_version":1,"created":true}
> > > > > > 
> > > > > > data-file.json looks as follows
> > > > > > 
> > > > > > {  
> > > > > > "content":"I am Happy",  
> > > > > > "contentid": "abcdedf",  
> > > > > > "filepath" : "\test1\test1.txt",  
> > > > > > "parsertype" : "txt"  
> > > > > > }
> > > > > > 
> > > > > > When I look at all contents
> > > > > > 
> > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"
> > > > > > 
> > > > > > {  
> > > > > > "took" : 53,  
> > > > > > "timed\_out" : false,  
> > > > > > "\_shards" : {  
> > > > > > "total" : 1,  
> > > > > > "successful" : 1,  
> > > > > > "failed" : 0  
> > > > > > },  
> > > > > > "hits" : {  
> > > > > > "total" : 1,  
> > > > > > "max\_score" : 1.0,  
> > > > > > "hits" : [ {  
> > > > > > "\_index" : "codeindexroute",  
> > > > > > "\_type" : "filecontracts",  
> > > > > > "\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
> > > > > > "\_score" : 1.0,  
> > > > > > "\_source":{}  
> > > > > > } ]  
> > > > > > }  
> > > > > > }
> > > > > > 
> > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?routing  
> > > > > > =bbb"
> > > > > > 
> > > > > > {"took":63,"timed\_out":false,"\_shards":{"total":1,"successfu  
> > > > > > l":1,"failed":0},"hi  
> > > > > > ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexr  
> > > > > > oute","\_type":"filec  
> > > > > > ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","\_score":1.0,"\_sour  
> > > > > > ce":{}}]}}
> > > > > > 
> > > > > > When I am searching with routing "bbb", Ideally it should not return  
> > > > > > any document as I have not indexed any document with this routing ID. I  
> > > > > > have just indexed one document with routing id "abc".
> > > > > > 
> > > > > > Am I making some mistake here or, is there any issue with ES? Please  
> > > > > > have a look,
> > > > > 
> > > > > --  
> > > > > 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).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40goo  
> > > > > [glegroups.com](http://glegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .
> > > > > 
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > 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).  
> > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%  
> > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/f797d066-cd54-4927-9fe2-dbd945034c79%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f797d066-cd54-4927-9fe2-dbd945034c79%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/f797d066-cd54-4927-9fe2-dbd945034c79%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/f797d066-cd54-4927-9fe2-dbd945034c79%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CACTSS%3D6MWxL%3Dqpk6f%3Di\_fdbs40ZetgEjB6ac96jYHn3UtVDMXg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CACTSS%3D6MWxL%3Dqpk6f%3Di_fdbs40ZetgEjB6ac96jYHn3UtVDMXg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![satishmallik](https://avatars.discourse-cdn.com/v4/letter/s/d9b06d/32.png) [@satishmallik](https://discuss.elastic.co/u/satishmallik)\
**Post date:** [July 1, 2014, 7:30am UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/8 "2014-07-01T07:30:30Z")

</div>

Still waiting for a response from ES team for this issue.

On Monday, June 30, 2014 6:41:55 PM UTC+5:30, satishmallik wrote:

> I am hitting same issue with 2 shards
> 
> curl "localhost:9200/codeindexroute/\_settings?pretty"  
> {  
> "codeindexroute" : {  
> "settings" : {  
> "index" : {  
> "index" : {  
> "refresh\_interval" : "-1"  
> },  
> "refresh\_interval" : "1000",  
> "number\_of\_shards" : "2",  
> "number\_of\_replicas" : "0",  
> "version" : {  
> "created" : "1020099"  
> },  
> "uuid" : "p\_8eAj0GSA-XNUWtQD6fLg"  
> }  
> }  
> }  
> }
> 
> Now I index the document
> 
> curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> @data-file.json
> 
> {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"n8-pLUU4TnS6LvhCDFIXkQ  
> ","\_version":1,"created":true}
> 
> curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"
> 
> {"took":1,"timed\_out":false,"\_shards":{"total":1,"successful":1,"failed":0},"hit
> 
> s":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexroute","\_type":"fileco  
> ntracts","\_id":"n8-pLUU4TnS6LvhCDFIXkQ","\_score":1.0,"\_source":{  
> "content  
> ":"I am Happy", "contentid": "abcdedf", "filepath" : "\test1\test1.txt",  
> "parsertype" : "txt"}}]}}
> 
> IMHO If hash collision is an issue then routing cannot be used at all and  
> it is not useful.It has to be definite
> 
> On Monday, June 30, 2014 5:19:40 PM UTC+5:30, Himanshu Agrawal wrote:
> 
> > The way elasticsearch routing works is that it hashes the string value  
> > provided by you to find the shard which contains the document. If you have  
> > less number of shards there is a high probability of collision between  
> > routing values such that they point to the same shard.
> > 
> > Can you try with different values? Also post the output you get when you  
> > try these requests with multiple shards.
> > 
> > On Mon, Jun 30, 2014 at 5:04 PM, satishmallik [satish...@gmail.com](mailto:satish...@gmail.com)  
> > wrote:
> > 
> > > Hi Himanshu,  
> > > Thnaks for your response. I have single shard in my setup. But as per ES  
> > > documents single shard can contain multiple routes. So route and Shard  
> > > don't have 1:1 mapping.  
> > > I tested it on an index with multiple shards. But I am facing same issue,
> > > 
> > > Regards  
> > > Satish
> > > 
> > > On Monday, June 30, 2014 2:17:25 PM UTC+5:30, Himanshu Agrawal wrote:
> > > 
> > > > Hi Satish,
> > > > 
> > > > From the requests and responses you have posted it seems that you only  
> > > > have a single shard for the index "codeindexroute". Now routing doesn't  
> > > > make sense when you have a single shard for an index because the request  
> > > > will be executed on the same shard irrespective of the routing value  
> > > > provided. That is why you are getting your document even after entering a  
> > > > different value for routing.
> > > > 
> > > > Thanks,  
> > > > Himanshu.
> > > > 
> > > > On Mon, Jun 30, 2014 at 12:36 PM, satishmallik [satish...@gmail.com](mailto:satish...@gmail.com)  
> > > > wrote:
> > > > 
> > > > > Still waiting for a response from ES team,
> > > > > 
> > > > > On Sunday, June 22, 2014 6:35:33 PM UTC+5:30, satishmallik wrote:
> > > > > 
> > > > > > I have following ES mapping defined,
> > > > > > 
> > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_mapping"
> > > > > > 
> > > > > > {  
> > > > > > "codeindexroute":{  
> > > > > > "mappings":{  
> > > > > > "filecontracts":{  
> > > > > > "\_routing":{  
> > > > > > "required":true  
> > > > > > },  
> > > > > > "\_source":{  
> > > > > > "compress":false,  
> > > > > > "includes":["filePath","parserType"],  
> > > > > > "excludes":["content"]  
> > > > > > },  
> > > > > > "properties":{  
> > > > > > "content":{  
> > > > > > "type":"string",  
> > > > > > "term\_vector":"with\_positions\_offsets"  
> > > > > > },  
> > > > > > "contentID":{  
> > > > > > "type":"string",  
> > > > > > "index":"not\_analyzed"  
> > > > > > },  
> > > > > > "filePath":{  
> > > > > > "type":"string",  
> > > > > > "index":"no",  
> > > > > > "store":true  
> > > > > > },  
> > > > > > "parserType":{  
> > > > > > "type":"string",  
> > > > > > "index":"not\_analyzed"  
> > > > > > }  
> > > > > > }  
> > > > > > }  
> > > > > > }  
> > > > > > }  
> > > > > > }
> > > > > > 
> > > > > > I index the doc with routing ID "abc",
> > > > > > 
> > > > > > curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> > > > > > @data-file.json
> > > > > > 
> > > > > > {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"6A  
> > > > > > OXcDl4TLWgyUnXlDUcww  
> > > > > > ","\_version":1,"created":true}
> > > > > > 
> > > > > > data-file.json looks as follows
> > > > > > 
> > > > > > {  
> > > > > > "content":"I am Happy",  
> > > > > > "contentid": "abcdedf",  
> > > > > > "filepath" : "\test1\test1.txt",  
> > > > > > "parsertype" : "txt"  
> > > > > > }
> > > > > > 
> > > > > > When I look at all contents
> > > > > > 
> > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"
> > > > > > 
> > > > > > {  
> > > > > > "took" : 53,  
> > > > > > "timed\_out" : false,  
> > > > > > "\_shards" : {  
> > > > > > "total" : 1,  
> > > > > > "successful" : 1,  
> > > > > > "failed" : 0  
> > > > > > },  
> > > > > > "hits" : {  
> > > > > > "total" : 1,  
> > > > > > "max\_score" : 1.0,  
> > > > > > "hits" : [ {  
> > > > > > "\_index" : "codeindexroute",  
> > > > > > "\_type" : "filecontracts",  
> > > > > > "\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
> > > > > > "\_score" : 1.0,  
> > > > > > "\_source":{}  
> > > > > > } ]  
> > > > > > }  
> > > > > > }
> > > > > > 
> > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?  
> > > > > > routing=bbb"
> > > > > > 
> > > > > > {"took":63,"timed\_out":false,"\_shards":{"total":1,"successfu  
> > > > > > l":1,"failed":0},"hi  
> > > > > > ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexr  
> > > > > > oute","\_type":"filec  
> > > > > > ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","_score":1.0,"_  
> > > > > > source":{}}]}}
> > > > > > 
> > > > > > When I am searching with routing "bbb", Ideally it should not return  
> > > > > > any document as I have not indexed any document with this routing ID. I  
> > > > > > have just indexed one document with routing id "abc".
> > > > > > 
> > > > > > Am I making some mistake here or, is there any issue with ES? Please  
> > > > > > have a look,
> > > > > 
> > > > > --  
> > > > > 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).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%  
> > > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .
> > > > > 
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > 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).  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/609d33bc-4ac7-45af-8646-6537bc483c7f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/609d33bc-4ac7-45af-8646-6537bc483c7f%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [July 1, 2014, 7:52am UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/9 "2014-07-01T07:52:03Z")

</div>

FYI this is a community mailing list, not a SLA based support channel.  
If you are patient someone will answer when they can spare some time.

Regards,  
Mark Walkom

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

On 1 July 2014 17:30, satishmallik [satishmallik@gmail.com](mailto:satishmallik@gmail.com) wrote:

> Still waiting for a response from ES team for this issue.
> 
> On Monday, June 30, 2014 6:41:55 PM UTC+5:30, satishmallik wrote:
> 
> > I am hitting same issue with 2 shards
> > 
> > curl "localhost:9200/codeindexroute/\_settings?pretty"  
> > {  
> > "codeindexroute" : {  
> > "settings" : {  
> > "index" : {  
> > "index" : {  
> > "refresh\_interval" : "-1"  
> > },  
> > "refresh\_interval" : "1000",  
> > "number\_of\_shards" : "2",  
> > "number\_of\_replicas" : "0",  
> > "version" : {  
> > "created" : "1020099"  
> > },  
> > "uuid" : "p\_8eAj0GSA-XNUWtQD6fLg"  
> > }  
> > }  
> > }  
> > }
> > 
> > Now I index the document
> > 
> > curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> > @data-file.json  
> > {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"  
> > n8-pLUU4TnS6LvhCDFIXkQ  
> > ","\_version":1,"created":true}
> > 
> > curl "localhost:9200/codeindexroute/filecontracts/\_search?routing=bbb"  
> > {"took":1,"timed\_out":false,"\_shards":{"total":1,"  
> > successful":1,"failed":0},"hit  
> > s":{"total":1,"max\_score":1.0,"hits":[{"\_index":"  
> > codeindexroute","\_type":"fileco  
> > ntracts","\_id":"n8-pLUU4TnS6LvhCDFIXkQ","\_score":1.0,"\_source":{  
> > "content  
> > ":"I am Happy", "contentid": "abcdedf", "filepath" : "\test1\test1.txt",  
> > "parsertype" : "txt"}}]}}
> > 
> > IMHO If hash collision is an issue then routing cannot be used at all and  
> > it is not useful.It has to be definite
> > 
> > On Monday, June 30, 2014 5:19:40 PM UTC+5:30, Himanshu Agrawal wrote:
> > 
> > > The way elasticsearch routing works is that it hashes the string value  
> > > provided by you to find the shard which contains the document. If you have  
> > > less number of shards there is a high probability of collision between  
> > > routing values such that they point to the same shard.
> > > 
> > > Can you try with different values? Also post the output you get when you  
> > > try these requests with multiple shards.
> > > 
> > > On Mon, Jun 30, 2014 at 5:04 PM, satishmallik [satish...@gmail.com](mailto:satish...@gmail.com)  
> > > wrote:
> > > 
> > > > Hi Himanshu,  
> > > > Thnaks for your response. I have single shard in my setup. But as per  
> > > > ES documents single shard can contain multiple routes. So route and Shard  
> > > > don't have 1:1 mapping.  
> > > > I tested it on an index with multiple shards. But I am facing same  
> > > > issue,
> > > > 
> > > > Regards  
> > > > Satish
> > > > 
> > > > On Monday, June 30, 2014 2:17:25 PM UTC+5:30, Himanshu Agrawal wrote:
> > > > 
> > > > > Hi Satish,
> > > > > 
> > > > > From the requests and responses you have posted it seems that you only  
> > > > > have a single shard for the index "codeindexroute". Now routing doesn't  
> > > > > make sense when you have a single shard for an index because the request  
> > > > > will be executed on the same shard irrespective of the routing value  
> > > > > provided. That is why you are getting your document even after entering a  
> > > > > different value for routing.
> > > > > 
> > > > > Thanks,  
> > > > > Himanshu.
> > > > > 
> > > > > On Mon, Jun 30, 2014 at 12:36 PM, satishmallik [satish...@gmail.com](mailto:satish...@gmail.com)  
> > > > > wrote:
> > > > > 
> > > > > > Still waiting for a response from ES team,
> > > > > > 
> > > > > > On Sunday, June 22, 2014 6:35:33 PM UTC+5:30, satishmallik wrote:
> > > > > > 
> > > > > > > I have following ES mapping defined,
> > > > > > > 
> > > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_mapping"
> > > > > > > 
> > > > > > > {  
> > > > > > > "codeindexroute":{  
> > > > > > > "mappings":{  
> > > > > > > "filecontracts":{  
> > > > > > > "\_routing":{  
> > > > > > > "required":true  
> > > > > > > },  
> > > > > > > "\_source":{  
> > > > > > > "compress":false,  
> > > > > > > "includes":["filePath","parserType"],  
> > > > > > > "excludes":["content"]  
> > > > > > > },  
> > > > > > > "properties":{  
> > > > > > > "content":{  
> > > > > > > "type":"string",  
> > > > > > > "term\_vector":"with\_positions\_offsets"  
> > > > > > > },  
> > > > > > > "contentID":{  
> > > > > > > "type":"string",  
> > > > > > > "index":"not\_analyzed"  
> > > > > > > },  
> > > > > > > "filePath":{  
> > > > > > > "type":"string",  
> > > > > > > "index":"no",  
> > > > > > > "store":true  
> > > > > > > },  
> > > > > > > "parserType":{  
> > > > > > > "type":"string",  
> > > > > > > "index":"not\_analyzed"  
> > > > > > > }  
> > > > > > > }  
> > > > > > > }  
> > > > > > > }  
> > > > > > > }  
> > > > > > > }
> > > > > > > 
> > > > > > > I index the doc with routing ID "abc",
> > > > > > > 
> > > > > > > curl "localhost:9200/codeindexroute/filecontracts/?routing=abc" -d  
> > > > > > > @data-file.json
> > > > > > > 
> > > > > > > {"\_index":"codeindexroute","\_type":"filecontracts","\_id":"6A  
> > > > > > > OXcDl4TLWgyUnXlDUcww  
> > > > > > > ","\_version":1,"created":true}
> > > > > > > 
> > > > > > > data-file.json looks as follows
> > > > > > > 
> > > > > > > {  
> > > > > > > "content":"I am Happy",  
> > > > > > > "contentid": "abcdedf",  
> > > > > > > "filepath" : "\test1\test1.txt",  
> > > > > > > "parsertype" : "txt"  
> > > > > > > }
> > > > > > > 
> > > > > > > When I look at all contents
> > > > > > > 
> > > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?pretty"
> > > > > > > 
> > > > > > > {  
> > > > > > > "took" : 53,  
> > > > > > > "timed\_out" : false,  
> > > > > > > "\_shards" : {  
> > > > > > > "total" : 1,  
> > > > > > > "successful" : 1,  
> > > > > > > "failed" : 0  
> > > > > > > },  
> > > > > > > "hits" : {  
> > > > > > > "total" : 1,  
> > > > > > > "max\_score" : 1.0,  
> > > > > > > "hits" : [ {  
> > > > > > > "\_index" : "codeindexroute",  
> > > > > > > "\_type" : "filecontracts",  
> > > > > > > "\_id" : "6AOXcDl4TLWgyUnXlDUcww",  
> > > > > > > "\_score" : 1.0,  
> > > > > > > "\_source":{}  
> > > > > > > } ]  
> > > > > > > }  
> > > > > > > }
> > > > > > > 
> > > > > > > curl "localhost:9200/codeindexroute/filecontracts/\_search?routing  
> > > > > > > =bbb"
> > > > > > > 
> > > > > > > {"took":63,"timed\_out":false,"\_shards":{"total":1,"successfu  
> > > > > > > l":1,"failed":0},"hi  
> > > > > > > ts":{"total":1,"max\_score":1.0,"hits":[{"\_index":"codeindexr  
> > > > > > > oute","\_type":"filec  
> > > > > > > ontracts","\_id":"6AOXcDl4TLWgyUnXlDUcww","\_score":1.0,"\_sour  
> > > > > > > ce":{}}]}}
> > > > > > > 
> > > > > > > When I am searching with routing "bbb", Ideally it should not return  
> > > > > > > any document as I have not indexed any document with this routing ID. I  
> > > > > > > have just indexed one document with routing id "abc".
> > > > > > > 
> > > > > > > Am I making some mistake here or, is there any issue with ES? Please  
> > > > > > > have a look,
> > > > > > 
> > > > > > --  
> > > > > > 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).  
> > > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > > msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40goo  
> > > > > > [glegroups.com](http://glegroups.com)  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/2b1a7219-a651-4802-a873-cc43ca191f4b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > .
> > > > > > 
> > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > 
> > > > > --  
> > > > > 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).  
> > > > > To view this discussion on the web visit [https://groups.google.com/d/](https://groups.google.com/d/)  
> > > > > msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%  
> > > > > [40googlegroups.com](http://40googlegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/8c88eb28-cb46-4ee0-878f-fdc6b79c761b%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .
> > > > 
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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/609d33bc-4ac7-45af-8646-6537bc483c7f%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/609d33bc-4ac7-45af-8646-6537bc483c7f%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/609d33bc-4ac7-45af-8646-6537bc483c7f%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/609d33bc-4ac7-45af-8646-6537bc483c7f%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEM624YgTAOLqFOWcNAg%2Bu3%2B%2BmJHMPj0wKFxs%2BUCKGLE74Sb4A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEM624YgTAOLqFOWcNAg%2Bu3%2B%2BmJHMPj0wKFxs%2BUCKGLE74Sb4A%40mail.gmail.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, 1:18am UTC](https://discuss.elastic.co/t/routing-not-working-for-es/18248/10 "2017-07-06T01:18:47Z")

</div>


