GET tmdb/_search
{
"size": 1,
"_source": " ",
"query": {
"match": {
"title": "star trek"
}
},
"aggs": {
"statuses": {
"terms": {
"field": "status.keyword"
},
"aggs": {
"hits": {
"top_hits": {
"size": 1
}
}
}
}
}
}
GET tmdb/_search
{
"size": 1,
"_source": "title",
"query": {
"match": {
"title": "star trek"
}
},
"aggs": {
"original_versions": {
"terms": {
"field": "original_language.keyword",
"order": {
"top_score": "desc"
}
},
"aggs": {
"hits": {
"top_hits": {
"size": 1
}
},
"top_score":{
"max": {
"script": "_score"
}
}
}
}
}
}