# Disable query unless user specifies index and a field

**URL:** https://discuss.elastic.co/t/disable-query-unless-user-specifies-index-and-a-field/22841
**Category:** Elasticsearch
**Created:** [March 24, 2015, 2:03am UTC](https://discuss.elastic.co/t/disable-query-unless-user-specifies-index-and-a-field/22841 "2015-03-24T02:03:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Andy\_4](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@Andy\_4](https://discuss.elastic.co/u/Andy_4)
#### Post date: [March 24, 2015, 2:03am UTC](https://discuss.elastic.co/t/disable-query-unless-user-specifies-index-and-a-field/22841/1 "2015-03-24T02:03:15Z")

</div>

In my org, each team is creating ES index so the number of index grows very  
quickly. Usually users are interested only in their 'product' data.  
Currently, users execute query using Kibana w/o specifying index(it takes  
\_all'). To force user to specify index, what are my options? At the same  
time, i would like users to specify field as well so query performance  
improves. Appreciate quick help since ES cluster comes down very frequently  
because of 'bad' queries. Thank you!

--  
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/40afbfa6-aa5e-4419-8829-db53b0e94b4a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/40afbfa6-aa5e-4419-8829-db53b0e94b4a%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: [March 24, 2015, 4:11am UTC](https://discuss.elastic.co/t/disable-query-unless-user-specifies-index-and-a-field/22841/2 "2015-03-24T04:11:00Z")

</div>

You'll want aliases with a routing query here, but to get the full benefit  
you'll have to reindex your data.

Sorry term, use aliases and consider setting up multiple KB instances.  
On 24/03/2015 1:03 pm, "Andy" [abordia@gmail.com](mailto:abordia@gmail.com) wrote:

> In my org, each team is creating ES index so the number of index grows  
> very quickly. Usually users are interested only in their 'product' data.  
> Currently, users execute query using Kibana w/o specifying index(it takes  
> \_all'). To force user to specify index, what are my options? At the same  
> time, i would like users to specify field as well so query performance  
> improves. Appreciate quick help since ES cluster comes down very frequently  
> because of 'bad' queries. Thank you!
> 
> --  
> 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/40afbfa6-aa5e-4419-8829-db53b0e94b4a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/40afbfa6-aa5e-4419-8829-db53b0e94b4a%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/40afbfa6-aa5e-4419-8829-db53b0e94b4a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/40afbfa6-aa5e-4419-8829-db53b0e94b4a%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-XG78aXD5nODDX\_XYzmHzg%3DHjUPUZ%2BKAXrNeLq4Tc5zg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X-XG78aXD5nODDX_XYzmHzg%3DHjUPUZ%2BKAXrNeLq4Tc5zg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Andy\_4](https://avatars.discourse-cdn.com/v4/letter/a/58f4c7/32.png) [@Andy\_4](https://discuss.elastic.co/u/Andy_4)
#### Post date: [March 24, 2015, 4:59am UTC](https://discuss.elastic.co/t/disable-query-unless-user-specifies-index-and-a-field/22841/3 "2015-03-24T04:59:39Z")

</div>

Mark,  
Very thanks for your answer. I am new to ES. Can i get implementation  
instruction or detailed answer? Thanks,  
Andy

On Monday, March 23, 2015 at 9:11:18 PM UTC-7, Mark Walkom wrote:

> You'll want aliases with a routing query here, but to get the full benefit  
> you'll have to reindex your data.
> 
> Sorry term, use aliases and consider setting up multiple KB instances.  
> On 24/03/2015 1:03 pm, "Andy" \<[abo...@gmail.com](mailto:abo...@gmail.com) \<javascript:\>\> wrote:
> 
> > In my org, each team is creating ES index so the number of index grows  
> > very quickly. Usually users are interested only in their 'product' data.  
> > Currently, users execute query using Kibana w/o specifying index(it takes  
> > \_all'). To force user to specify index, what are my options? At the same  
> > time, i would like users to specify field as well so query performance  
> > improves. Appreciate quick help since ES cluster comes down very frequently  
> > because of 'bad' queries. Thank you!
> > 
> > --  
> > 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/40afbfa6-aa5e-4419-8829-db53b0e94b4a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/40afbfa6-aa5e-4419-8829-db53b0e94b4a%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/40afbfa6-aa5e-4419-8829-db53b0e94b4a%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/40afbfa6-aa5e-4419-8829-db53b0e94b4a%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/80cd42a8-68ed-4515-8d9e-12cf53fba5b9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/80cd42a8-68ed-4515-8d9e-12cf53fba5b9%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:24am UTC](https://discuss.elastic.co/t/disable-query-unless-user-specifies-index-and-a-field/22841/4 "2017-07-06T00:24:37Z")

</div>


