# Elasticsearch reduce latency with allow\_partial\_search\_results

**URL:** <https://discuss.elastic.co/t/elasticsearch-reduce-latency-with-allow-partial-search-results/287865>\
**Category:** Elasticsearch\
**Created:** [October 28, 2021, 2:33am UTC](https://discuss.elastic.co/t/elasticsearch-reduce-latency-with-allow-partial-search-results/287865 "2021-10-28T02:33:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![niketpatel2525](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/niketpatel2525/32/95263_2.png) [@niketpatel2525](https://discuss.elastic.co/u/niketpatel2525)\
**Post date:** [October 28, 2021, 2:33am UTC](https://discuss.elastic.co/t/elasticsearch-reduce-latency-with-allow-partial-search-results/287865/1 "2021-10-28T02:33:37Z")

</div>

I have an index with 60 shards. I am trying to get total counts which match my Elasticsearch query. I am using the "allow\_partial\_search\_results" query param to get total results. Without this query param, some of the shards fail and return incomplete results.

But with this approach, my p99 latency gets increased significantly. Is there any way I can optimize this?

Thank you for the help and your time. 🙂

---

<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:** [November 25, 2021, 2:33am UTC](https://discuss.elastic.co/t/elasticsearch-reduce-latency-with-allow-partial-search-results/287865/2 "2021-11-25T02:33:46Z")

</div>

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