paged_search
Retrieve paginated search results past the 10,000-document limit using point-in-time and search_after. Use the returned pit_id and next_search_after to fetch the following page.
Instructions
Page through a large result set beyond the 10000 deep-paging limit using a point-in-time and search_after. First call: open_pit, then call this with the pit_id and a query; it returns one page plus next_search_after and the (possibly refreshed) pit_id. Pass both back on the next call to get the following page. A sort is required and an implicit _shard_doc tiebreak is added for stable ordering. No index argument: the PIT already binds the index. Close with close_pit at the end.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | ||
| sort | No | ||
| query | No | ||
| pit_id | Yes | ||
| keep_alive | No | 1m | |
| search_after | No | ||
| source_includes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |