Hi guys.
I've been trials for metric aggregation. I noticed something
interesting. Elasticsearch does not compute repeated values in the metric
aggregation.
For example, as my documents
{name:"kimchy",
exam_notes:["6","5","6","3"]
}
When I run the metric aggregation, the result is as follows.
GET mytest/test/_search
{
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"sum_exam_notes": {
"sum": {
"field": "exam_notes"
}
}
}
}
"aggregations": {
"sum_exam_notes": {
"value": 14
}
}
6 + 5 + 6 + 3 instead of 6 + 5 + 3
Why?
--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.