# Routing

**URL:** <https://discuss.elastic.co/t/routing/6640>\
**Category:** Elasticsearch\
**Created:** [February 8, 2012, 5:10pm UTC](https://discuss.elastic.co/t/routing/6640 "2012-02-08T17:10:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![micuenta99](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@micuenta99](https://discuss.elastic.co/u/micuenta99)\
**Post date:** [February 8, 2012, 5:10pm UTC](https://discuss.elastic.co/t/routing/6640/1 "2012-02-08T17:10:26Z")

</div>

Hi,

Although I have indexed the documents without routing, whether I do a  
search with or without routing always get the same results. Is it  
normal?

Thanks

---

<div class="post-metadata">

**Author:** ![micuenta99](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@micuenta99](https://discuss.elastic.co/u/micuenta99)\
**Post date:** [February 8, 2012, 5:19pm UTC](https://discuss.elastic.co/t/routing/6640/2 "2012-02-08T17:19:59Z")

</div>

How I can verify that the routing is working correctly?

Thanks

On 8 feb, 18:10, micu99 [micuent...@gmail.com](mailto:micuent...@gmail.com) wrote:

> Hi,
> 
> Although I have indexed the documents without routing, whether I do a  
> search with or without routing always get the same results. Is it  
> normal?
> 
> Thanks

---

<div class="post-metadata">

**Author:** ![micuenta99](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@micuenta99](https://discuss.elastic.co/u/micuenta99)\
**Post date:** [February 9, 2012, 7:22am UTC](https://discuss.elastic.co/t/routing/6640/3 "2012-02-09T07:22:15Z")

</div>

Can anyone help me with this?

Thanks,

On 8 feb, 18:19, micu99 [micuent...@gmail.com](mailto:micuent...@gmail.com) wrote:

> How I can verify that the routing is working correctly?
> 
> Thanks
> 
> On 8 feb, 18:10, micu99 [micuent...@gmail.com](mailto:micuent...@gmail.com) wrote:
> 
> > Hi,
> 
> > Although I have indexed the documents without routing, whether I do a  
> > search with or without routing always get the same results. Is it  
> > normal?
> 
> > Thanks

---

<div class="post-metadata">

**Author:** ![Craig\_Brown](https://avatars.discourse-cdn.com/v4/letter/c/ce7236/32.png) [@Craig\_Brown](https://discuss.elastic.co/u/Craig_Brown)\
**Post date:** [February 10, 2012, 5:37pm UTC](https://discuss.elastic.co/t/routing/6640/4 "2012-02-10T17:37:15Z")

</div>

Routing needs to be done at indexing time and at search time. It also  
depends on how many shards you have. If you only have 1 shard, then routing  
will not do anything. If you have a number of shards, then routing can work  
really well.

- Craig

On Thu, Feb 9, 2012 at 12:22 AM, micu99 [micuenta99@gmail.com](mailto:micuenta99@gmail.com) wrote:

> Can anyone help me with this?
> 
> Thanks,
> 
> On 8 feb, 18:19, micu99 [micuent...@gmail.com](mailto:micuent...@gmail.com) wrote:
> 
> > How I can verify that the routing is working correctly?
> > 
> > Thanks
> > 
> > On 8 feb, 18:10, micu99 [micuent...@gmail.com](mailto:micuent...@gmail.com) wrote:
> > 
> > > Hi,
> > 
> > > Although I have indexed the documents without routing, whether I do a  
> > > search with or without routing always get the same results. Is it  
> > > normal?
> > 
> > > Thanks

--  
…  
CRAIG BROWN  
chief architect  
youwho, Inc.

_[www.youwho.com](http://www.youwho.com)_ [http://www.youwho.com/](http://www.youwho.com/)

T: 801.855. 0921  
M: 801.913. 0939

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 12, 2012, 2:25pm UTC](https://discuss.elastic.co/t/routing/6640/5 "2012-02-12T14:25:22Z")

</div>

Simplest way would be to index with a routing value, and then do a get without the routing value, and ask for \_routing in the fields. If you get a document back, with the \_routing in the field, then you have indexed that routing. (we ask for the \_routing field as well, since even when you don't provide routing, the id might end up being hashed to the same shard as with the routing value).

On Wednesday, February 8, 2012 at 7:19 PM, micu99 wrote:

> How I can verify that the routing is working correctly?
> 
> Thanks
> 
> On 8 feb, 18:10, micu99 \<[micuent...@gmail.com](mailto:micuent...@gmail.com) ([http://gmail.com](http://gmail.com))\> wrote:
> 
> > Hi,
> > 
> > Although I have indexed the documents without routing, whether I do a  
> > search with or without routing always get the same results. Is it  
> > normal?
> > 
> > Thanks

---

<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, 3:39am UTC](https://discuss.elastic.co/t/routing/6640/6 "2017-07-06T03:39:45Z")

</div>


