# Problem with routing Elasticsearch has shard which has 0 document

**URL:** <https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401>\
**Category:** Elasticsearch\
**Created:** [December 26, 2014, 8:25pm UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401 "2014-12-26T20:25:19Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandeep\_kaushal\_verm](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandeep\_kaushal\_verm](https://discuss.elastic.co/u/sandeep_kaushal_verm)\
**Post date:** [December 26, 2014, 8:25pm UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401/1 "2014-12-26T20:25:19Z")

</div>

i Have 20 shards . when i put documents 1 shard shows has no document.  
other has same number of document except 1 which has double.

--  
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/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 26, 2014, 8:28pm UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401/2 "2014-12-26T20:28:39Z")

</div>

Are you using routing?  
How many different routing Key are you using?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 26 déc. 2014 à 21:25, sandeep kaushal verma [sandeepkaushalverma@gmail.com](mailto:sandeepkaushalverma@gmail.com) a écrit :
> 
> ## i Have 20 shards . when i put documents 1 shard shows has no document. other has same number of document except 1 which has double.
> 
> 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/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com).  
> 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/D8355949-3E50-42BE-B0C5-54420EDBED59%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/D8355949-3E50-42BE-B0C5-54420EDBED59%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![sandeep\_kaushal\_verm](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandeep\_kaushal\_verm](https://discuss.elastic.co/u/sandeep_kaushal_verm)\
**Post date:** [December 26, 2014, 8:34pm UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401/3 "2014-12-26T20:34:58Z")

</div>

20 routing key  
On Saturday, 27 December 2014 01:58:51 UTC+5:30, David Pilato wrote:

> Are you using routing?  
> How many different routing Key are you using?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 26 déc. 2014 à 21:25, sandeep kaushal verma \<[sandeepka...@gmail.com](mailto:sandeepka...@gmail.com)  
> \<javascript:\>\> a écrit :
> 
> i Have 20 shards . when i put documents 1 shard shows has no document.  
> other has same number of document except 1 which has double.
> 
> --  
> 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/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%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/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![sandeep\_kaushal\_verm](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandeep\_kaushal\_verm](https://discuss.elastic.co/u/sandeep_kaushal_verm)\
**Post date:** [December 26, 2014, 8:36pm UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401/4 "2014-12-26T20:36:46Z")

</div>

is there any problem occur in future when we 1 shard with 0 document . just  
because we are moving it to production.  
On Saturday, 27 December 2014 02:04:58 UTC+5:30, sandeep kaushal verma  
wrote:

> 20 routing key  
> On Saturday, 27 December 2014 01:58:51 UTC+5:30, David Pilato wrote:
> 
> > Are you using routing?  
> > How many different routing Key are you using?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 26 déc. 2014 à 21:25, sandeep kaushal verma [sandeepka...@gmail.com](mailto:sandeepka...@gmail.com)  
> > a écrit :
> > 
> > i Have 20 shards . when i put documents 1 shard shows has no document.  
> > other has same number of document except 1 which has double.
> > 
> > --  
> > 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/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%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/e1e2d3d7-ac6c-43fa-a6cc-ed93d59b84cc%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e1e2d3d7-ac6c-43fa-a6cc-ed93d59b84cc%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [December 26, 2014, 9:04pm UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401/5 "2014-12-26T21:04:25Z")

</div>

So sadly one of the routing key correspond to another routing key.

Why do you want to have this 1:1 relation between keys and shards ?  
Why 20 shards?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

> Le 26 déc. 2014 à 21:34, sandeep kaushal verma [sandeepkaushalverma@gmail.com](mailto:sandeepkaushalverma@gmail.com) a écrit :
> 
> 20 routing key
> 
> > On Saturday, 27 December 2014 01:58:51 UTC+5:30, David Pilato wrote:  
> > Are you using routing?  
> > How many different routing Key are you using?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > > Le 26 déc. 2014 à 21:25, sandeep kaushal verma [sandeepka...@gmail.com](mailto:sandeepka...@gmail.com) a écrit :
> > > 
> > > ## i Have 20 shards . when i put documents 1 shard shows has no document. other has same number of document except 1 which has double.
> > > 
> > > 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/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com).  
> > > 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/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com).  
> 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/616957DE-78B6-4585-A17A-29973E958E32%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/616957DE-78B6-4585-A17A-29973E958E32%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![sandeep\_kaushal\_verm](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandeep\_kaushal\_verm](https://discuss.elastic.co/u/sandeep_kaushal_verm)\
**Post date:** [December 27, 2014, 12:54pm UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401/6 "2014-12-27T12:54:03Z")

</div>

just want i have approx 80 million user records with there respective  
properties .1 user has owner of n properties but user properties not fixed  
depend upon what user do. I just want approx equal distribution of users on  
each shard it like 4 million each . and one more thing user and it's  
properties increse dynamically.

On Saturday, 27 December 2014 02:34:48 UTC+5:30, David Pilato wrote:

> So sadly one of the routing key correspond to another routing key.
> 
> Why do you want to have this 1:1 relation between keys and shards ?  
> Why 20 shards?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 26 déc. 2014 à 21:34, sandeep kaushal verma \<[sandeepka...@gmail.com](mailto:sandeepka...@gmail.com)  
> \<javascript:\>\> a écrit :
> 
> 20 routing key  
> On Saturday, 27 December 2014 01:58:51 UTC+5:30, David Pilato wrote:
> 
> > Are you using routing?  
> > How many different routing Key are you using?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 26 déc. 2014 à 21:25, sandeep kaushal verma [sandeepka...@gmail.com](mailto:sandeepka...@gmail.com)  
> > a écrit :
> > 
> > i Have 20 shards . when i put documents 1 shard shows has no document.  
> > other has same number of document except 1 which has double.
> > 
> > --  
> > 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/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%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/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/785d8406-dd90-427c-959c-20294763a368%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/77d51d51-bb0f-46b1-b5ed-c8b7866039e7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/77d51d51-bb0f-46b1-b5ed-c8b7866039e7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![sandeep\_kaushal\_verm](https://avatars.discourse-cdn.com/v4/letter/s/4491bb/32.png) [@sandeep\_kaushal\_verm](https://discuss.elastic.co/u/sandeep_kaushal_verm)\
**Post date:** [December 27, 2014, 12:59pm UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401/7 "2014-12-27T12:59:44Z")

</div>

just because i want expend it to 20 node . i have approx 80 million user  
records with there respective properties .1 user has owner of n properties  
but user properties not fixed depend upon what user do. I just want approx  
equal distribution of users on each shard it like 4 million each . and one  
more thing user and it's properties increse dynamically.

On Saturday, 27 December 2014 18:24:03 UTC+5:30, sandeep kaushal verma  
wrote:

> just want i have approx 80 million user records with there respective  
> properties .1 user has owner of n properties but user properties not fixed  
> depend upon what user do. I just want approx equal distribution of users on  
> each shard it like 4 million each . and one more thing user and it's  
> properties increse dynamically.
> 
> On Saturday, 27 December 2014 02:34:48 UTC+5:30, David Pilato wrote:
> 
> > So sadly one of the routing key correspond to another routing key.
> > 
> > Why do you want to have this 1:1 relation between keys and shards ?  
> > Why 20 shards?
> > 
> > --  
> > David 😉  
> > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > 
> > Le 26 déc. 2014 à 21:34, sandeep kaushal verma [sandeepka...@gmail.com](mailto:sandeepka...@gmail.com)  
> > a écrit :
> > 
> > 20 routing key  
> > On Saturday, 27 December 2014 01:58:51 UTC+5:30, David Pilato wrote:
> > 
> > > Are you using routing?  
> > > How many different routing Key are you using?
> > > 
> > > --  
> > > David 😉  
> > > Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> > > 
> > > Le 26 déc. 2014 à 21:25, sandeep kaushal verma [sandeepka...@gmail.com](mailto:sandeepka...@gmail.com)  
> > > a écrit :
> > > 
> > > i Have 20 shards . when i put documents 1 shard shows has no document.  
> > > other has same number of document except 1 which has double.
> > > 
> > > --  
> > > 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/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/220a5044-d0a0-4269-bd77-d5f49857a159%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/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/785d8406-dd90-427c-959c-20294763a368%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/785d8406-dd90-427c-959c-20294763a368%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/a53a6735-d1ef-452d-aa20-29ca899e57c9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/a53a6735-d1ef-452d-aa20-29ca899e57c9%40googlegroups.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, 12:41am UTC](https://discuss.elastic.co/t/problem-with-routing-elasticsearch-has-shard-which-has-0-document/21401/8 "2017-07-06T00:41:49Z")

</div>


