Data Preparation for ML and AI

An engineer must extract millions of documents from a changing OpenSearch Service index using deep pagination. The extraction must reflect a fixed index state and support retrying a page while its search context remains valid. Which approach meets these requirements?

Show the answer

Correct answerA. Use search_after pagination with a point-in-time context.

AWhy this is right: A point-in-time context preserves the view, while search_after permits deep pagination and repeatable page requests.

BWhy not this: Deep from-and-size pagination is resource-intensive, and live searches do not preserve a fixed index view.

CWhy not this: search_after supports deep pagination, but live index changes can alter results between requests.

DWhy not this: Independently refreshed views do not provide one consistent index state for the complete extraction.

A point-in-time context preserves an index view, and search_after supports deep pagination within it. Using search_after against the live index does not preserve a fixed view as documents change.