Elasticsearch & Lucene (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
Deep Pagination at Scale: `from`/`size` limit vs `search_after` vs Scroll API.
senior LevelHTTP & REST APIs
In Simple Words:
from/size(The 10,000 Limit): Requestingfrom: 100000, size: 10forces every shard to fetch 100,010 documents into memory and ship them to the coordinating node for sorting, crashing the node. Capped atindex.max_result_window = 10000.search_after(Recommended for Live Pagination): Uses the sort values of the last retrieved document as an index cursor. $O(1)$ memory consumption and blazing fast.- Scroll API: Designed exclusively for batch data exports (ETL). Deprecated for user-facing interactive searches because it keeps open search contexts in memory.