elasticsearch - Wrong sum with aggregations -
i'm trying run query:
get my_index/_search { "size": 0, "query": { "bool": { "filter": [ { "query_string": { "query": "_exists_:products_count", "default_operator": "and" } } ] } }, "aggs": { "pid": { "terms": { "field": "pid", "size": 15, "order": { "products_counter": "asc" } }, "aggs": { "products_counter": { "sum": { "field": "products_count" } } } } } }
the results are:
{ "took": 5, "timed_out": false, "_shards": { "total": 12, "successful": 12, "failed": 0 }, "hits": { "total": 489681, "max_score": 0, "hits": [] }, "aggregations": { "pid": { "doc_count_error_upper_bound": -1, "sum_other_doc_count": 488443, "buckets": [ { "key": 3229479298, "doc_count": 14, "products_counter": { "value": 26 } }, {...
although results pid returned 188 , not 26. if raise size of aggregation 15 100000 example right number. understanding , fixing problem?
Comments
Post a Comment