# Getting from in search response

**URL:** https://discuss.elastic.co/t/getting-from-in-search-response/232616
**Category:** Elasticsearch
**Created:** [May 14, 2020, 10:35am UTC](https://discuss.elastic.co/t/getting-from-in-search-response/232616 "2020-05-14T10:35:56Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![guruprasadkk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/guruprasadkk/32/66271_2.png) [@guruprasadkk](https://discuss.elastic.co/u/guruprasadkk)
#### Post date: [May 14, 2020, 10:35am UTC](https://discuss.elastic.co/t/getting-from-in-search-response/232616/1 "2020-05-14T10:35:56Z")

</div>

Previously we were using the solr, now we migrated to elastic search. We are using basic pagination with rows, offset.

In solr from search response we can get the offset value we used for that query by using  
#SolrDocumentList.getStart() which we used to return to the client as start index and based on the number of results in the response we used to compute end index (start index + size) and return it to the caller.

We want to maintain the same contract now also even though we change to elastic search.  
From elastic search response is there any way to get the "from" value?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [May 14, 2020, 12:23pm UTC](https://discuss.elastic.co/t/getting-from-in-search-response/232616/2 "2020-05-14T12:23:31Z")

</div>

I don't think you can.  
But as you are sending it part of the request, it should not be hard to know what you actually sent.

---

<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: [June 11, 2020, 12:23pm UTC](https://discuss.elastic.co/t/getting-from-in-search-response/232616/3 "2020-06-11T12:23:38Z")

</div>

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