# "search\_after" not working

**URL:** https://discuss.elastic.co/t/search-after-not-working/202024
**Category:** Elasticsearch
**Created:** [October 2, 2019, 6:01pm UTC](https://discuss.elastic.co/t/search-after-not-working/202024 "2019-10-02T18:01:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hive](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/hive/32/46651_2.png) [@hive](https://discuss.elastic.co/u/hive)
#### Post date: [October 2, 2019, 6:01pm UTC](https://discuss.elastic.co/t/search-after-not-working/202024/1 "2019-10-02T18:01:37Z")

</div>

I am using a Java client to search. I see below request generated with appropriate "search\_after" values and sort columns (i also see result data sorted based on these columns).

Response does NOT start with "Greg" as mentioned in "search\_after"array. ES responds complete list regardless of "search\_after"

Am i missing something obvious? Any specific attribute that I need to check in mapping?

Thank you

{  
"from": 0,  
"size": 100,  
"timeout": "60s",  
"query": {  
"bool": {  
"must": [  
{  
"bool": {  
"must": [  
{  
"bool": {  
"must": [  
**......**  
},  
"sort": [  
{  
"chr\_associate.given\_name": {  
"order": "asc"  
}  
},  
{  
"chr\_associate.aoid": {  
"order": "asc"  
}  
}  
],  
"search\_after": [  
"Greg",  
"G3K6X14228P82HB5"  
]  
}

---

<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 30, 2019, 6:01pm UTC](https://discuss.elastic.co/t/search-after-not-working/202024/2 "2019-10-30T18:01:44Z")

</div>

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