1
我試圖在elasticsearch中構建一個嵌套聚合,但它不斷給出錯誤。它說「找不到agg類型標籤」。我該如何解決它。謝謝你的幫助.Btw我沒有嵌套文件我有一個文件有180個字段。我可以應用此聚合嗎?這裏是我的代碼:嵌套聚合Elasticsearch
{
"aggs": {
"comments": {
"nested": {
"path": "comments"
},
"aggs" : {
"red_products": {
"filter": {
"not": {
"terms": {
"text": [
"06melihgokcek",
"t.co","??","????","???"
]
}
}
},
"aggs": {
"top_docs": {
"terms": {
"field": "text",
"size": 50
}
},
"aggs" : {
"tags" : {
"terms" : {
"field" : "text",
"include" : ".*avni.*",
"exclude" : "fuat_.*"
}
}
}
}
}
}
}}}
感謝您的幫助 –