# Any way to restrict msearch done by any client for any index

**URL:** <https://discuss.elastic.co/t/any-way-to-restrict-msearch-done-by-any-client-for-any-index/38252>\
**Category:** Elasticsearch\
**Created:** [January 2, 2016, 4:48am UTC](https://discuss.elastic.co/t/any-way-to-restrict-msearch-done-by-any-client-for-any-index/38252 "2016-01-02T04:48:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [January 2, 2016, 4:48am UTC](https://discuss.elastic.co/t/any-way-to-restrict-msearch-done-by-any-client-for-any-index/38252/1 "2016-01-02T04:48:04Z")

</div>

I want to restrict an msearch made by a client for a specific index in elastic search . Is there any possible approach available in elasticsearch to skip a search right away ?

---

<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:** [January 2, 2016, 5:10am UTC](https://discuss.elastic.co/t/any-way-to-restrict-msearch-done-by-any-client-for-any-index/38252/2 "2016-01-02T05:10:30Z")

</div>

You can use Shield to restrict access to the endpoint, but otherwise there isn't a way within ES itself.

---

<div class="post-metadata">

**Author:** ![soodlikesjava](https://avatars.discourse-cdn.com/v4/letter/s/ee7513/32.png) [@soodlikesjava](https://discuss.elastic.co/u/soodlikesjava)\
**Post date:** [January 2, 2016, 5:01pm UTC](https://discuss.elastic.co/t/any-way-to-restrict-msearch-done-by-any-client-for-any-index/38252/3 "2016-01-02T17:01:08Z")

</div>

Thanks for your response.What I was thinking is if I can write a plugin where I can define a rest filter and update the IndicesRequest with specific index and skip the other index.Can you please review this approach if it will be fine to achieve it

---

<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 5, 2017, 11:27pm UTC](https://discuss.elastic.co/t/any-way-to-restrict-msearch-done-by-any-client-for-any-index/38252/4 "2017-07-05T23:27:26Z")

</div>


