# SearchRequestBuilder.setFrom() does not accept a long value

**URL:** https://discuss.elastic.co/t/searchrequestbuilder-setfrom-does-not-accept-a-long-value/7957
**Category:** Elasticsearch
**Created:** [June 4, 2012, 9:22am UTC](https://discuss.elastic.co/t/searchrequestbuilder-setfrom-does-not-accept-a-long-value/7957 "2012-06-04T09:22:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![kanishk](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kanishk](https://discuss.elastic.co/u/kanishk)
#### Post date: [June 4, 2012, 9:22am UTC](https://discuss.elastic.co/t/searchrequestbuilder-setfrom-does-not-accept-a-long-value/7957/1 "2012-06-04T09:22:40Z")

</div>

setFrom() method of SearchRequestBuilder class only accept a int value, so if i have to fetch record which is greater than a int value (2147483647) for example -

SearchRequestBuilder.setFrom(21474836478)

The above value is not accepted as it is greater than maximum integer value.

So is it possible to pass Long as a parameter in setFrom() as parameter or is there any other API of elasticsearch which i can use to fetch results for more than max int value (i.e. 2147483647) ?

Thanks  
Kanishk

---

<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: [July 6, 2017, 3:25am UTC](https://discuss.elastic.co/t/searchrequestbuilder-setfrom-does-not-accept-a-long-value/7957/2 "2017-07-06T03:25:46Z")

</div>


