# How to use preference search on the elasticsearch input plugin?

**URL:** <https://discuss.elastic.co/t/how-to-use-preference-search-on-the-elasticsearch-input-plugin/54549>\
**Category:** Logstash\
**Created:** [July 1, 2016, 3:44pm UTC](https://discuss.elastic.co/t/how-to-use-preference-search-on-the-elasticsearch-input-plugin/54549 "2016-07-01T15:44:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![esamudio](https://avatars.discourse-cdn.com/v4/letter/e/df788c/32.png) [@esamudio](https://discuss.elastic.co/u/esamudio)\
**Post date:** [July 1, 2016, 3:44pm UTC](https://discuss.elastic.co/t/how-to-use-preference-search-on-the-elasticsearch-input-plugin/54549/1 "2016-07-01T15:44:36Z")

</div>

I'm interested in the [preference search](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html) to query by shard. Is there a way to do that in the elasticsearch input plugin?

In case that's not possible, I could simply edit the plugin and reinstall it? I presume it shouldn't be that hard of a fix if it's just a chance to the url for the request

---

<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:** [July 3, 2016, 12:52am UTC](https://discuss.elastic.co/t/how-to-use-preference-search-on-the-elasticsearch-input-plugin/54549/2 "2016-07-03T00:52:43Z")

</div>

You cannot do that with the plugin as it is now.

---

<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, 4:49am UTC](https://discuss.elastic.co/t/how-to-use-preference-search-on-the-elasticsearch-input-plugin/54549/3 "2017-07-06T04:49:47Z")

</div>

Closed on July 6, 2017, 4:49am UTC


