# Can we run a search query on a particular shard of the index?

**URL:** <https://discuss.elastic.co/t/can-we-run-a-search-query-on-a-particular-shard-of-the-index/189831>\
**Category:** Elasticsearch\
**Created:** [July 10, 2019, 4:47pm UTC](https://discuss.elastic.co/t/can-we-run-a-search-query-on-a-particular-shard-of-the-index/189831 "2019-07-10T16:47:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![praveengadugin1](https://avatars.discourse-cdn.com/v4/letter/p/858c86/32.png) [@praveengadugin1](https://discuss.elastic.co/u/praveengadugin1)\
**Post date:** [July 10, 2019, 4:47pm UTC](https://discuss.elastic.co/t/can-we-run-a-search-query-on-a-particular-shard-of-the-index/189831/1 "2019-07-10T16:47:12Z")

</div>

Is there a way to get documents from a specific shard?

like GET index&shard=2/\_search

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [July 10, 2019, 4:52pm UTC](https://discuss.elastic.co/t/can-we-run-a-search-query-on-a-particular-shard-of-the-index/189831/2 "2019-07-10T16:52:06Z")

</div>

Yes, you can do this with the [search preference](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-preference.html) feature: `GET /index/_search?preference=_shards:2,3`.

---

<div class="post-metadata">

**Author:** ![praveengadugin1](https://avatars.discourse-cdn.com/v4/letter/p/858c86/32.png) [@praveengadugin1](https://discuss.elastic.co/u/praveengadugin1)\
**Post date:** [July 10, 2019, 5:08pm UTC](https://discuss.elastic.co/t/can-we-run-a-search-query-on-a-particular-shard-of-the-index/189831/3 "2019-07-10T17:08:25Z")

</div>

Oh nice. Our recovery/relocating process for a particular shard is really really slow. It was 20 percent 2 days before and 60 percent now. It was not this slow before. We have removed replica from that index and only have primary shards. Could that be the reason for the slow recovery

---

<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:** [August 7, 2019, 5:08pm UTC](https://discuss.elastic.co/t/can-we-run-a-search-query-on-a-particular-shard-of-the-index/189831/4 "2019-08-07T17:08:29Z")

</div>

Closed on August 7, 2019, 5:08pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
