# setFrom() method of SearchRequestBuilder class only accepts a int value

**URL:** https://discuss.elastic.co/t/setfrom-method-of-searchrequestbuilder-class-only-accepts-a-int-value/7958
**Category:** Elasticsearch
**Created:** [June 4, 2012, 9:27am UTC](https://discuss.elastic.co/t/setfrom-method-of-searchrequestbuilder-class-only-accepts-a-int-value/7958 "2012-06-04T09:27:49Z")
**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:27am UTC](https://discuss.elastic.co/t/setfrom-method-of-searchrequestbuilder-class-only-accepts-a-int-value/7958/1 "2012-06-04T09:27:49Z")

</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

---

<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/setfrom-method-of-searchrequestbuilder-class-only-accepts-a-int-value/7958/2 "2017-07-06T03:25:45Z")

</div>


