获取“现场数据加载被禁止”试图聚合时 [英] Getting "Field data loading is forbidden" when trying to aggregate
本文介绍了获取“现场数据加载被禁止”试图聚合时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图做一个简单的独特聚合,但是得到这个错误:
I'm trying to do a simple unique aggregation, but getting this error:
java.lang.IllegalStateException: Field data loading is forbidden on eid
这是我的查询:
POST /logstash-2016.06.*/Nginx/_search
{
"query": {
"bool": {
"filter": [
{
"term": {
"pid": "1"
}
},
{
"term": {
"cvprogress": "0"
}
},
{
"range" : {
"ServerTime" : {
"gte" : "2016-06-28T00:00:00"
}
}
}
]
}
},
"aggs": {
"distinct_colors" : {
"cardinality" : {
"field" : "eid"
}
}
}
}
推荐答案
在 https://github.com/elastic/elasticsearch/issues/15267 ,工作是什么添加.raw
After going through the entire thread at https://github.com/elastic/elasticsearch/issues/15267 what worked was adding .raw
如下:
"aggs": {
"distinct_colors" : {
"cardinality" : {
"field" : "eid.raw"
}
}
}
这篇关于获取“现场数据加载被禁止”试图聚合时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文