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?