# Questions on custom routing

**URL:** <https://discuss.elastic.co/t/questions-on-custom-routing/17779>\
**Category:** Elasticsearch\
**Created:** [May 28, 2014, 11:57am UTC](https://discuss.elastic.co/t/questions-on-custom-routing/17779 "2014-05-28T11:57:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chetana](https://avatars.discourse-cdn.com/v4/letter/c/dbc845/32.png) [@Chetana](https://discuss.elastic.co/u/Chetana)\
**Post date:** [May 28, 2014, 11:57am UTC](https://discuss.elastic.co/t/questions-on-custom-routing/17779/1 "2014-05-28T11:57:14Z")

</div>

I want to create an index repo with multiple (3) shards and  
use explict/custom \_routing while indexing. I have a couple of questions,  
can somebody please answer

1. If I explictly set \_routing,  
does ES take care of load balancing of index data,  
indexrequest, search request  
If ES does not take care of load balancing, how to plugin  
custom code which does load balancing
2. The doumentation says (  
[http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-routing-field.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-routing-field.html)) that the  
id uniquess can not be guaranteed if one sets \_routing explictly. If an  
application can generate unique id and set then is there any issue  
still in guaranteeing uniqueness

Thanks,

--  
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/46de2fe5-828b-43ec-9bc8-5efbf72d7989%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/46de2fe5-828b-43ec-9bc8-5efbf72d7989%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![ElasticSearch\_Users\_](https://avatars.discourse-cdn.com/v4/letter/e/b4bc9f/32.png) [@ElasticSearch\_Users\_](https://discuss.elastic.co/u/ElasticSearch_Users_)\
**Post date:** [May 30, 2014, 10:10pm UTC](https://discuss.elastic.co/t/questions-on-custom-routing/17779/2 "2014-05-30T22:10:47Z")

</div>

1. ES will use your routing value to do indexing and searches and narrow it  
down directly (specifically helpful for searches) to a single shard.

2. If you produce your own document ID, then ES will just use it without  
any issues.

--  
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/e81b273b-47fe-4645-bb7e-e13a6120cbdd%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e81b273b-47fe-4645-bb7e-e13a6120cbdd%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, 1:25am UTC](https://discuss.elastic.co/t/questions-on-custom-routing/17779/3 "2017-07-06T01:25:33Z")

</div>

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


