How to page for terms aggs?

my request like this:

GET _search
{
"query": {
"bool": {
"must": [
{
"match": {
"class": "Article"
}
},
{
"match_phrase": {
"title": "happy"
}
}
]
}
},
"size": 0,
"aggs": {
"removefileiddup": {
"terms": {
"field": "fileid",
"size": 100,
"order":{"max_reads":"desc"}
},
"aggs": {
"max_reads": { "max": { "field": "reads" }},
"top_tag_hits": {
"top_hits": {
"_source": {
"include": [
"title",
"reads",
"url"
]
},
"from": 0,
"size": 1
}
}
}
}
}
}
}

web server is java,have any good idea?

1 Like

Hi Changexy,

It looks that this isn't currently supported but is an active feature request:

Thanks.

thanks a lot