0
我有我的索引嵌套類型的映射:elasticsearch 5嵌套長期聚集不起作用
"actors": {
"type": "nested",
"properties": {
"actor": {
"type": "nested",
"properties": {
"actor_full_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
}
}
}
當我看到DATAS它看起來是好的
請求
GET /test_index/film/_search
{
"size": 100,
"_source": "actors.actor.actor_full_name"
}
給我這個答案:
"actors": {
"actor": [
{
"actor_full_name": "Antonio BANDERAS"
},
{
"actor_full_name": "Diane VENORA"
},
{
"actor_full_name": "Omar SHARIF"
},
{
"actor_full_name": "Vladimir KULICH"
}
]
},
...
我想對actor_full_name領域做了nested aggregation request
我想這個請求:
POST /test_index/film/_search
{
"size": 0,
"aggs": {
"actor_nested_agg_code": {
"nested": {
"path": "actors"
},
"aggs": {
"code_actor_agg": {
"terms": {
"field": "actor.actor_full_name.keyword",
"size": 100
}
}
}
}
}
}
不幸的是它似乎給我一個incorect aswere:
"aggregations": {
"actor_nested_agg_code": {
"doc_count": 1807,
"code_actor_agg": {
"doc_count_error_upper_bound": 0,
"sum_other_doc_count": 0,
"buckets": []
}
}
}
你明白我做錯了,我該如何修復它?