# Multiple index search and PIT index ID reuse

**URL:** <https://discuss.elastic.co/t/multiple-index-search-and-pit-index-id-reuse/306247>\
**Category:** Elasticsearch\
**Created:** [June 2, 2022, 3:01pm UTC](https://discuss.elastic.co/t/multiple-index-search-and-pit-index-id-reuse/306247 "2022-06-02T15:01:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattsbennett](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattsbennett/32/106536_2.png) [@mattsbennett](https://discuss.elastic.co/u/mattsbennett)\
**Post date:** [June 2, 2022, 3:01pm UTC](https://discuss.elastic.co/t/multiple-index-search-and-pit-index-id-reuse/306247/1 "2022-06-02T15:01:14Z")

</div>

I’m planning to search multiple different sets of [multiple indices at once](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multiple-indices.html). I’d also like to use `search_after` with point-in-time indices for deep pagination. I’ve got some general questions about how/if PIT works in this scenario.

1. Calling the `_pit` endpoint with multiple indices works fine, but I’m not sure exactly how it works - is the PIT index coupled to the comma-separated set of indices I pass in my call to `_pit` (e.g. `/index-1,index-2/_pit?keep_alive=15m` will open a PIT id usable with any search where I want results from `index-1,index-2` )? Also, will the implicit `_shard_doc` tiebreaking work when creating a multi-index PIT index?

2. The [guidance on the elastic blog here](https://www.elastic.co/blog/get-a-consistent-view-of-your-data-over-time-with-the-elasticsearch-point-in-time-reader) re: having a background process create a PIT for use with all search requests (rather than creating one on each search request) seems to contradict the [PIT docs](https://www.elastic.co/guide/en/elasticsearch/reference/current/point-in-time-api.html#:~:text=The%20open%20point%20in%20time%20request%20and%20each%20subsequent%20search%20request%20can%20return%20different%20id%3B%20thus%20always%20use%20the%20most%20recently%20received%20id%20for%20the%20next%20search%20request) which state the following — I must be misunderstanding one of these statements?

> The open point in time request and each subsequent search request can return different id; thus always use the most recently received id for the next search request.

---

<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 30, 2022, 3:01pm UTC](https://discuss.elastic.co/t/multiple-index-search-and-pit-index-id-reuse/306247/2 "2022-06-30T15:01:51Z")

</div>

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