0
안녕하세요, 총 노출 수 합계를 계산하기 위해 지금까지 아무런 노력도하지 않고 있지만 계속 오류가 발생합니다.집계 필드의 총계 집계
GET smarttag-2016.06.28.*/_search?search_type=count
{
"query": {
"bool": {
"must": [{
"range": {
"@timestamp": {
"gte": "2016-06-28T10:00:00",
"lt": "2016-06-28T11:00:00"
}
}
}],
"must_not": [
{
"term": {
"tagType": {
"value": "app"
}
}
}
]
}
},
"aggs": {
"TagId": {
"terms": {
"field": "TagId",
"size": 0
},
"aggs": {
"name": {
"terms": {
"field": "url",
"size": 0
},
"aggs": {
"tagType": {
"terms": {
"field": "type"
},
"aggs": {
"impressions": {
"sum": {
"field": "imp"
}
}
}
}
}
}
}
},
"sum_imp": {
"sum_bucket": {
"buckets_path": "TagId>name>tagType>impressions"
}
}
}
}
오류 :
{
"error": {
"root_cause": [],
"type": "reduce_search_phase_exception",
"reason": "[reduce] ",
"phase": "query",
"grouped": true,
"failed_shards": [],
"caused_by": {
"type": "aggregation_execution_exception",
"reason": "buckets_path must reference either a number value or a single value numeric metric aggregation, got: java.lang.Object[]"
}
},
"status": 503
}
내가 뭘 잘못 이해하지 나는 다음 쿼리를 얻었다.
나는 "agg"라는 이름으로 "크기 : 0"이 문제일지도 모른다고 생각합니까? – haltabush
나는 생각하지 않는다. 나는 그것을 제거하고 나는 여전히 같은 오류가 발생합니다. – wizard