A priority queue is just a sorted list that holds the top-n matching
documents. The size of the priority queue depends on the pagination
parameters from
and size
. For example, the following search request
would require a priority queue big enough to hold 100 documents:
GET /_search
{
"from": 90,
"size": 10
}