# Scroll timeout not taking in decimal for ES 5.4.1

**URL:** <https://discuss.elastic.co/t/scroll-timeout-not-taking-in-decimal-for-es-5-4-1/99854>\
**Category:** Elasticsearch\
**Created:** [September 8, 2017, 1:30pm UTC](https://discuss.elastic.co/t/scroll-timeout-not-taking-in-decimal-for-es-5-4-1/99854 "2017-09-08T13:30:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dimalini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dimalini/32/22448_2.png) [@dimalini](https://discuss.elastic.co/u/dimalini)\
**Post date:** [September 8, 2017, 1:30pm UTC](https://discuss.elastic.co/t/scroll-timeout-not-taking-in-decimal-for-es-5-4-1/99854/1 "2017-09-08T13:30:18Z")

</div>

Hi,  
We use the scroll api along with timeout option. Sample query like  
GET my\_index/my\_type/\_search?scroll=1.1m  
{  
"query": {  
"match" : {  
"content" : "a"  
}  
}  
}

scroll=1.1m worked perfectly in ES2.4.1 but is throwing a parse exception in ES5.4.1 as below  
_"type": "parse\_exception",_  
\_ "reason": "failed to parse [1.1m], fractional time values are not supported"\_

What is the reason for this change? Why are fraction values no more supported, could someone explain?

Thanks, Divya

---

<div class="post-metadata">

**Author:** ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)\
**Post date:** [September 9, 2017, 3:41pm UTC](https://discuss.elastic.co/t/scroll-timeout-not-taking-in-decimal-for-es-5-4-1/99854/2 "2017-09-09T15:41:21Z")

</div>

Apparently the support for fractional time values was removed with this [https://github.com/elastic/elasticsearch/pull/19102](https://github.com/elastic/elasticsearch/pull/19102)

It is unclear why, maybe @jasontedor can explain better.

But as a solution, couldn't you simply use an integer value in seconds?

---

<div class="post-metadata">

**Author:** ![jasontedor](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jasontedor/32/66992_2.png) [@jasontedor](https://discuss.elastic.co/u/jasontedor)\
**Post date:** [September 9, 2017, 7:43pm UTC](https://discuss.elastic.co/t/scroll-timeout-not-taking-in-decimal-for-es-5-4-1/99854/3 "2017-09-09T19:43:54Z")

</div>

Previously these time values were converted internally to nanoseconds, and at that point what the user entered would be lost (that is 1.1m and 66s would be represented the same internally). We switched to representing them in a format where we do not lose this information. We based this representation on Java `TimeUnit`. `TimeUnit` does not support fractional values. We felt that the simplicity of using a built-in for representing these time values was worth not supporting fractional values which:

- are fraught with difficulties because of floating-point representations
- do not offer any additional flexibility versus the user simply switching to another time unit (e.g., `1.5h` can be changed to `90m`).

---

<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 7, 2017, 7:44pm UTC](https://discuss.elastic.co/t/scroll-timeout-not-taking-in-decimal-for-es-5-4-1/99854/4 "2017-10-07T19:44:09Z")

</div>

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