# Elastic SearchSearch API - default\_allow\_partial\_results parameter

**URL:** <https://discuss.elastic.co/t/elastic-searchsearch-api-default-allow-partial-results-parameter/315553>\
**Category:** Elasticsearch\
**Created:** [September 30, 2022, 12:30pm UTC](https://discuss.elastic.co/t/elastic-searchsearch-api-default-allow-partial-results-parameter/315553 "2022-09-30T12:30:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![edsonma](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/edsonma/32/111511_2.png) [@edsonma](https://discuss.elastic.co/u/edsonma)\
**Post date:** [September 30, 2022, 12:30pm UTC](https://discuss.elastic.co/t/elastic-searchsearch-api-default-allow-partial-results-parameter/315553/1 "2022-09-30T12:30:22Z")

</div>

I am working on a project and looking at ES documentation I found a query parameter **allow\_partial\_search\_results**.

> (Optional, Boolean) If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. Defaults to true.
> 
> To override the default for this field, set the search.default\_allow\_partial\_results cluster setting to false.

The documentation shows that setting it false it will returns an error "with no partial results".

But I don't know how is that return. Do anyone knows if the returning error format is like ES internal error format?

> { 'took' =\> , 'timed\_out' =\> false, '\_shards' =\> { 'total' =\> , 'successful' =\> , 'skipped' =\> 0, 'failed' =\> 1, 'failures' =\> [{ 'shard' =\> 35, 'index' =\> 'value\_index\_20210622', 'node' =\> '', 'reason' =\> { 'type' =\> '', 'reason' =\>] disconnected' } }] }, 'hits' =\> { 'total' =\> 0, 'max\_score'=\> 0, 'hits' =\> } } }

Or it returns an exception?

Anyone has an implemented example how to catch the error for proper treatment?

Thank you everyone

---

<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:** [October 28, 2022, 12:30pm UTC](https://discuss.elastic.co/t/elastic-searchsearch-api-default-allow-partial-results-parameter/315553/2 "2022-10-28T12:30:25Z")

</div>

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