# Elastic Search Timeout Property for Search

**URL:** <https://discuss.elastic.co/t/elastic-search-timeout-property-for-search/123310>\
**Category:** Elasticsearch\
**Created:** [March 9, 2018, 5:15pm UTC](https://discuss.elastic.co/t/elastic-search-timeout-property-for-search/123310 "2018-03-09T17:15:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![raj.shah1593](https://avatars.discourse-cdn.com/v4/letter/r/8edcca/32.png) [@raj.shah1593](https://discuss.elastic.co/u/raj.shah1593)\
**Post date:** [March 9, 2018, 5:15pm UTC](https://discuss.elastic.co/t/elastic-search-timeout-property-for-search/123310/1 "2018-03-09T17:15:39Z")

</div>

Hi,

I am currently using ES v6.1.2.  
I plan to use the **timeout** property for search in ES.  
Can someone explain how this property works in ES and how can I integrate it with Java.

For example,  
I have observed that even though the **took** time takes 100 ms and my timeout is set to 1ms, the **timed\_out** property in the result is returned as **false**.

Also, when I fired a search query, I received **timed\_out : true** with only a limited set of docs in response. But the same query, after firing it again, returned **timed\_out : false** with the complete docs in response.

I also read about **global timeout**. Does it stop the query on ES DB at shard level?  
Or only terminates it for the calling client?

I plan to terminate inquiries if they exceed the given timeout.  
Kindly help.

Thanks in advance.

---

<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:** [April 6, 2018, 5:16pm UTC](https://discuss.elastic.co/t/elastic-search-timeout-property-for-search/123310/2 "2018-04-06T17:16:06Z")

</div>

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