# Search\_after without PIT

**URL:** <https://discuss.elastic.co/t/search-after-without-pit/300788>\
**Category:** Elasticsearch\
**Created:** [March 27, 2022, 8:37pm UTC](https://discuss.elastic.co/t/search-after-without-pit/300788 "2022-03-27T20:37:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahmedasadi](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@ahmedasadi](https://discuss.elastic.co/u/ahmedasadi)\
**Post date:** [March 27, 2022, 8:37pm UTC](https://discuss.elastic.co/t/search-after-without-pit/300788/1 "2022-03-27T20:37:40Z")

</div>

In the documentation for 'search\_after', it says that inconsistent results may be returned if a refresh occurs when not using a PIT. I have a few questions:

1. Can duplicate results be returned?
2. Will it return all the documents that were present before the refresh (excluding any documents that were deleted in the refresh)?

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [March 28, 2022, 8:30am UTC](https://discuss.elastic.co/t/search-after-without-pit/300788/2 "2022-03-28T08:30:50Z")

</div>

Hey,

Both answers depend if they were part of the search\_after argument. If yes, then you are paging beyond those documents, if not they could be.

Does that make sense?

--Alex

---

<div class="post-metadata">

**Author:** ![ahmedasadi](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@ahmedasadi](https://discuss.elastic.co/u/ahmedasadi)\
**Post date:** [April 8, 2022, 10:11am UTC](https://discuss.elastic.co/t/search-after-without-pit/300788/3 "2022-04-08T10:11:28Z")

</div>

Hey Alex,

I'm using '\_doc' as the sort order, and I'm using the 'sort' value of the last hit in every search\_after request. Will I eventually get all documents that were present when the first request was made, without duplicates, given that they weren't deleted in a refresh?

---

<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:** [May 6, 2022, 10:12am UTC](https://discuss.elastic.co/t/search-after-without-pit/300788/4 "2022-05-06T10:12:22Z")

</div>

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