# Query scoped timeout and allow\_partial\_search\_results

**URL:** <https://discuss.elastic.co/t/query-scoped-timeout-and-allow-partial-search-results/209844>\
**Category:** Elasticsearch\
**Created:** [November 28, 2019, 11:27am UTC](https://discuss.elastic.co/t/query-scoped-timeout-and-allow-partial-search-results/209844 "2019-11-28T11:27:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fax4ever](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/fax4ever/32/47474_2.png) [@fax4ever](https://discuss.elastic.co/u/fax4ever)\
**Post date:** [November 28, 2019, 11:27am UTC](https://discuss.elastic.co/t/query-scoped-timeout-and-allow-partial-search-results/209844/1 "2019-11-28T11:27:21Z")

</div>

Hi guys.

According to [this page](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-body.html), it seems that the parameter for the timeout is `search_timeout` and not `timeout` anymore.  
On this [other page](https://www.elastic.co/guide/en/elasticsearch/reference/current/common-options.html#time-units), it seems it is still `timeout`.

I'm using the REST API, making some tests, using Elasticsearch 7.4.2, it seems `timeout` is parsed and `search_timeout` is not.

Moreover, it seems that:

1. `timeout`could be provided both as query parameter and as body entry (at the same level of "query" entry)
2. `allow_partial_search_results` could be provided only as query parameter

Furthermore, trying to provoke a timeout:

localhost:9200/indexname/\_search?allow\_partial\_search\_results=false&timeout=1nanos  
{  
"query": {  
"bool": {  
"should": [{  
"match": {  
"string1": {  
"boost": 39.0,  
"query": "Irving"  
}  
}  
}, {  
"match": {  
"string1": {  
"query": "Coe"  
}  
}  
}]  
}  
},  
"sort": ["\_score"]  
}

I got:  
{  
"took": 1,  
"timed\_out": false,  
"\_shards": {  
"total": 1,  
"successful": 1,  
"skipped": 0,  
"failed": 0  
}  
...  
}

According to the response it seems that query took 1 millisecond and my timeout is set to 1 nanosecond. Why is not timed out?

I'm pretty sure I'm doing something wrong and I didn’t understood very well the documentation.

Thanks  
Fabio

---

<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:** [December 26, 2019, 11:27am UTC](https://discuss.elastic.co/t/query-scoped-timeout-and-allow-partial-search-results/209844/2 "2019-12-26T11:27:22Z")

</div>

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