# Disable routing only for specific queries

**URL:** <https://discuss.elastic.co/t/disable-routing-only-for-specific-queries/22355>\
**Category:** Elasticsearch\
**Created:** [February 24, 2015, 2:00pm UTC](https://discuss.elastic.co/t/disable-routing-only-for-specific-queries/22355 "2015-02-24T14:00:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mauricio\_Linhares\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mauricio_linhares_2/32/880_2.png) [@Mauricio\_Linhares\_2](https://discuss.elastic.co/u/Mauricio_Linhares_2)\
**Post date:** [February 24, 2015, 2:00pm UTC](https://discuss.elastic.co/t/disable-routing-only-for-specific-queries/22355/1 "2015-02-24T14:00:22Z")

</div>

Hello everyone,

I have a mapping where I defined a routing value and made it required. This  
is all good, as I want all queries to define it, but now I have the need to  
run a couple general queries at the whole index (I don´t want to provide a  
routing, I want it to search across all documents everywhere), is there a  
way for me to disable routing only for these special queries or do I have  
to disable routing completely?

--  
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/97a499e9-f514-423f-ba34-c0e8c516e701%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/97a499e9-f514-423f-ba34-c0e8c516e701%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:** [February 24, 2015, 8:19pm UTC](https://discuss.elastic.co/t/disable-routing-only-for-specific-queries/22355/2 "2015-02-24T20:19:02Z")

</div>

If you do not use a routing value your query will search all shards by  
default.

On 25 February 2015 at 01:00, Maurício Linhares \<[linhares.mauricio@gmail.com](mailto:linhares.mauricio@gmail.com)

> wrote:

> Hello everyone,
> 
> I have a mapping where I defined a routing value and made it required.  
> This is all good, as I want all queries to define it, but now I have the  
> need to run a couple general queries at the whole index (I don´t want to  
> provide a routing, I want it to search across all documents everywhere), is  
> there a way for me to disable routing only for these special queries or do  
> I have to disable routing completely?
> 
> --  
> 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/97a499e9-f514-423f-ba34-c0e8c516e701%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/97a499e9-f514-423f-ba34-c0e8c516e701%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/97a499e9-f514-423f-ba34-c0e8c516e701%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/97a499e9-f514-423f-ba34-c0e8c516e701%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/CAEYi1X\_A%2B-Qu%3DU%3D\_4v3KunOP9%3D%3DxXLQYLXHe45fCGzh2E0v21Q%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_A%2B-Qu%3DU%3D_4v3KunOP9%3D%3DxXLQYLXHe45fCGzh2E0v21Q%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, 12:30am UTC](https://discuss.elastic.co/t/disable-routing-only-for-specific-queries/22355/3 "2017-07-06T00:30:26Z")

</div>


