# Should I close the older PIT id once it has been replaced by a new PIT id?

**URL:** <https://discuss.elastic.co/t/should-i-close-the-older-pit-id-once-it-has-been-replaced-by-a-new-pit-id/293420>\
**Category:** Elasticsearch\
**Tags:** point-in-time\
**Created:** [January 4, 2022, 8:51am UTC](https://discuss.elastic.co/t/should-i-close-the-older-pit-id-once-it-has-been-replaced-by-a-new-pit-id/293420 "2022-01-04T08:51:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pranay\_jain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pranay_jain/32/92747_2.png) [@pranay\_jain](https://discuss.elastic.co/u/pranay_jain)\
**Post date:** [January 4, 2022, 8:51am UTC](https://discuss.elastic.co/t/should-i-close-the-older-pit-id-once-it-has-been-replaced-by-a-new-pit-id/293420/1 "2022-01-04T08:51:24Z")

</div>

I am working on a task in which I have to search a large number of documents in Elasticsearch. I use SearchAPI with SearchAfter and PointInTime as recommended. While fetching the results, I am using the PIT ID returned by the previous search request in next request. My questions are:

1. I noticed that PIT ID is always same in the responses. Can there be a different PIT return in the request?
2. If a new PIT is returned, do I need to close both the PITs in the end?

---

<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:** [February 1, 2022, 8:52am UTC](https://discuss.elastic.co/t/should-i-close-the-older-pit-id-once-it-has-been-replaced-by-a-new-pit-id/293420/2 "2022-02-01T08:52:00Z")

</div>

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