Hi.
I have a question regarding to running an aggregation on a paginated query.
For example, this query:
{
"size": 0,
"from": 100,
"query": {
"match_all": {}
},
"aggs": {
"agg_top_hits": {
"top_hits": {
"size": 1,
"_source": {
"includes": [
"username"
]
}
}
}
}
}
In this case the store has only 2 documents.
My question is, shouldn't the aggregation run on the set of matched documents? If my store has only 2 documents, shouldn't the aggregation be empty once the from is over 2?