# Exception making Search Query using SearchSourceBuilder

**URL:** <https://discuss.elastic.co/t/exception-making-search-query-using-searchsourcebuilder/95451>\
**Category:** Elasticsearch\
**Created:** [August 2, 2017, 4:52am UTC](https://discuss.elastic.co/t/exception-making-search-query-using-searchsourcebuilder/95451 "2017-08-02T04:52:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pankajkchothe](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@pankajkchothe](https://discuss.elastic.co/u/pankajkchothe)\
**Post date:** [August 2, 2017, 4:52am UTC](https://discuss.elastic.co/t/exception-making-search-query-using-searchsourcebuilder/95451/1 "2017-08-02T04:52:20Z")

</div>

Hi Team,

I started using Elastic Search 5.3 and I used jest client to query elastic search. I used SearchSourceBuilder to build query. I am setting soft timeout in SearchSourceBuilder but elastic search throwing following exception while executing query. Any insights on this

Caused by: ElasticsearchException[Error while executing the query: {"root\_cause":[{"type":"parse\_exception","reason":"failed to parse setting [timeout] with value [600] as a time value: unit is missing or unrecognized"}],"type":"parse\_exception","reason":"failed to parse setting [timeout] with value [600] as a time value: unit is missing or unrecognized"}]  
... 43 more

---

<div class="post-metadata">

**Author:** ![polyfractal](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/polyfractal/32/48162_2.png) [@polyfractal](https://discuss.elastic.co/u/polyfractal)\
**Post date:** [August 2, 2017, 8:08pm UTC](https://discuss.elastic.co/t/exception-making-search-query-using-searchsourcebuilder/95451/2 "2017-08-02T20:08:14Z")

</div>

It means that the time you are providing needs to include units: `600s` for example

---

<div class="post-metadata">

**Author:** ![pankajkchothe](https://avatars.discourse-cdn.com/v4/letter/p/ebca7d/32.png) [@pankajkchothe](https://discuss.elastic.co/u/pankajkchothe)\
**Post date:** [August 2, 2017, 8:21pm UTC](https://discuss.elastic.co/t/exception-making-search-query-using-searchsourcebuilder/95451/3 "2017-08-02T20:21:18Z")

</div>

Yes I tried to provide value with 600s too and it is showing same exception.

---

<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 30, 2017, 8:21pm UTC](https://discuss.elastic.co/t/exception-making-search-query-using-searchsourcebuilder/95451/4 "2017-08-30T20:21:21Z")

</div>

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