# Elasticsearch does not compute repeated values in the metric aggregation

**URL:** <https://discuss.elastic.co/t/elasticsearch-does-not-compute-repeated-values-in-the-metric-aggregation/19918>\
**Category:** Elasticsearch\
**Created:** [September 22, 2014, 4:58pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-compute-repeated-values-in-the-metric-aggregation/19918 "2014-09-22T16:58:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![terrasacer](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@terrasacer](https://discuss.elastic.co/u/terrasacer)\
**Post date:** [September 22, 2014, 4:58pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-compute-repeated-values-in-the-metric-aggregation/19918/1 "2014-09-22T16:58:18Z")

</div>

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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 22, 2014, 5:54pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-compute-repeated-values-in-the-metric-aggregation/19918/2 "2014-09-22T17:54:30Z")

</div>

Indeed. For now, the way your field is indexed looks like this:

Value, Doc ID  
6, 1  
5, 1  
3, 1

(I simplify a lot)

So, when we do the sum, we only sum different values (I mean within the same document).

The only workaround I can see here is to detect a index time that you have some identical values and instead of indexing  
["6","5","6","3"]

Index in another field deduplicated values:

["12","5","3"]

Doc1: {name:"kimchy",  
exam\_note:6  
}  
Doc2: {name:"kimchy",  
exam\_note:5  
}  
Doc3: {name:"kimchy",  
exam\_note:6  
}  
Doc4: {name:"kimchy",  
exam\_note:3  
}

It will give you the expected result.

Still, I think this should be added in documentation. Wanna contribute?

--  
David Pilato | Technical Advocate | [elasticsearch.com](http://elasticsearch.com)  
[david.pilato@elasticsearch.com](mailto:david.pilato@elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 22 septembre 2014 à 18:58:23, Terra Sacer ([terrasacer@gmail.com](mailto:terrasacer@gmail.com)) a écrit:

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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.54206256.62bbd95a.825%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.54206256.62bbd95a.825%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![terrasacer](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@terrasacer](https://discuss.elastic.co/u/terrasacer)\
**Post date:** [September 22, 2014, 7:05pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-compute-repeated-values-in-the-metric-aggregation/19918/3 "2014-09-22T19:05:05Z")

</div>

Hi David,

Thank you for your answer.

Still, I think this should be added in documentation.

> 

Absolutely agree.

I would like to contribute, but how?

On Monday, September 22, 2014 8:54:47 PM UTC+3, David Pilato wrote:

> Indeed. For now, the way your field is indexed looks like this:
> 
> Value, Doc ID  
> 6, 1  
> 5, 1  
> 3, 1
> 
> (I simplify a lot)
> 
> So, when we do the sum, we only sum different values (I mean within the  
> same document).
> 
> The only workaround I can see here is to detect a index time that you have  
> some identical values and instead of indexing
> 
> ["6","5","6","3"]
> 
> Index in another field deduplicated values:
> 
> ["12","5","3"]
> 
> Doc1: {name:"kimchy",  
> exam\_note:6  
> }
> 
> Doc2: {name:"kimchy",  
> exam\_note:5  
> }
> 
> Doc3: {name:"kimchy",  
> exam\_note:6  
> }
> 
> Doc4: {name:"kimchy",  
> exam\_note:3  
> }
> 
> It will give you the expected result.
> 
> Still, I think this should be added in documentation. Wanna contribute?
> 
> --  
> _David Pilato_ | Technical Advocate | _[elasticsearch.com](http://elasticsearch.com)  
> [http://elasticsearch.com](http://elasticsearch.com)_  
> [david....@elasticsearch.com](mailto:david....@elasticsearch.com) \<javascript:\>  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [http://twitter.com/scrutmydocs](http://twitter.com/scrutmydocs)  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 22 septembre 2014 à 18:58:23, Terra Sacer ([terra...@gmail.com](mailto:terra...@gmail.com)  
> \<javascript:\>) a écrit:
> 
> 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ae73f864-480b-4847-87f1-85ed4641d854%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ae73f864-480b-4847-87f1-85ed4641d854%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [September 22, 2014, 7:19pm UTC](https://discuss.elastic.co/t/elasticsearch-does-not-compute-repeated-values-in-the-metric-aggregation/19918/4 "2014-09-22T19:19:52Z")

</div>

Cool. That’s easy. Read this: [https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md](https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md)

If you click on Edit button at [http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-sum-aggregation.html](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-sum-aggregation.html) it will fork and edit the source page.

🙂

Best

--  
David Pilato | Technical Advocate | [elasticsearch.com](http://elasticsearch.com)  
[david.pilato@elasticsearch.com](mailto:david.pilato@elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 22 septembre 2014 à 21:05:15, Terra Sacer ([terrasacer@gmail.com](mailto:terrasacer@gmail.com)) a écrit:

Hi David,

Thank you for your answer.

Still, I think this should be added in documentation.

Absolutely agree.

I would like to contribute, but how?

On Monday, September 22, 2014 8:54:47 PM UTC+3, David Pilato wrote:  
Indeed. For now, the way your field is indexed looks like this:

Value, Doc ID  
6, 1  
5, 1  
3, 1

(I simplify a lot)

So, when we do the sum, we only sum different values (I mean within the same document).

The only workaround I can see here is to detect a index time that you have some identical values and instead of indexing  
["6","5","6","3"]

Index in another field deduplicated values:

["12","5","3"]

Doc1: {name:"kimchy",  
exam\_note:6  
}  
Doc2: {name:"kimchy",  
exam\_note:5  
}  
Doc3: {name:"kimchy",  
exam\_note:6  
}  
Doc4: {name:"kimchy",  
exam\_note:3  
}

It will give you the expected result.

Still, I think this should be added in documentation. Wanna contribute?

--  
David Pilato | Technical Advocate | [elasticsearch.com](http://elasticsearch.com)  
[david....@elasticsearch.com](mailto:david....@elasticsearch.com)  
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 22 septembre 2014 à 18:58:23, Terra Sacer ([terra...@gmail.com](mailto:terra...@gmail.com)) a écrit:

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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com). To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com). For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/ae73f864-480b-4847-87f1-85ed4641d854%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ae73f864-480b-4847-87f1-85ed4641d854%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/etPan.54207658.333ab105.825%40MacBook-Air-de-David.local](https://groups.google.com/d/msgid/elasticsearch/etPan.54207658.333ab105.825%40MacBook-Air-de-David.local).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![terrasacer](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@terrasacer](https://discuss.elastic.co/u/terrasacer)\
**Post date:** [September 23, 2014, 9:18am UTC](https://discuss.elastic.co/t/elasticsearch-does-not-compute-repeated-values-in-the-metric-aggregation/19918/5 "2014-09-23T09:18:24Z")

</div>

Hi David.

Thank you for your guidance and support.

Best regards.

On Monday, September 22, 2014 10:20:32 PM UTC+3, David Pilato wrote:

> Cool. That’s easy. Read this:  
> [https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md](https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md)
> 
> [https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md](https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md)  
> I  
> [https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md](https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md)f  
> you click on Edit button at  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-aggregations-metrics-sum-aggregation.html) it  
> will fork and edit the source page.
> 
> :  
> [https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md](https://github.com/elasticsearch/elasticsearch/blob/master/CONTRIBUTING.md)  
> )
> 
> Best
> 
> --  
> _David Pilato_ | Technical Advocate | _[elasticsearch.com](http://elasticsearch.com)  
> [http://elasticsearch.com](http://elasticsearch.com)_  
> [david....@elasticsearch.com](mailto:david....@elasticsearch.com) \<javascript:\>  
> @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> [http://twitter.com/scrutmydocs](http://twitter.com/scrutmydocs)  
> [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> 
> Le 22 septembre 2014 à 21:05:15, Terra Sacer ([terra...@gmail.com](mailto:terra...@gmail.com)  
> \<javascript:\>) a écrit:
> 
> Hi David,
> 
> Thank you for your answer.
> 
> Still, I think this should be added in documentation.
> 
> > 
> 
> Absolutely agree.
> 
> I would like to contribute, but how?
> 
> On Monday, September 22, 2014 8:54:47 PM UTC+3, David Pilato wrote:
> 
> > Indeed. For now, the way your field is indexed looks like this:
> > 
> > Value, Doc ID  
> > 6, 1  
> > 5, 1  
> > 3, 1
> > 
> > (I simplify a lot)
> > 
> > So, when we do the sum, we only sum different values (I mean within the  
> > same document).
> > 
> > The only workaround I can see here is to detect a index time that you  
> > have some identical values and instead of indexing
> > 
> > ["6","5","6","3"]
> > 
> > Index in another field deduplicated values:
> > 
> > ```
> > ["12","5","3"]
> > 
> > Doc1: {name:"kimchy",
> > 
> > ```
> > 
> > exam\_note:6  
> > }
> > 
> > ```
> > Doc2: {name:"kimchy",
> > 
> > ```
> > 
> > exam\_note:5  
> > }
> > 
> > ```
> > Doc3: {name:"kimchy",
> > 
> > ```
> > 
> > exam\_note:6  
> > }
> > 
> > ```
> > Doc4: {name:"kimchy",
> > 
> > ```
> > 
> > exam\_note:3  
> > }
> > 
> > It will give you the expected result.
> > 
> > Still, I think this should be added in documentation. Wanna contribute?
> > 
> > --
> > 
> > - David Pilato\* | Technical Advocate | _[elasticsearch.com](http://elasticsearch.com)  
> > [http://elasticsearch.com](http://elasticsearch.com)_  
> > [david....@elasticsearch.com](mailto:david....@elasticsearch.com)  
> > @dadoonet [https://twitter.com/dadoonet](https://twitter.com/dadoonet) | @elasticsearchfr  
> > [https://twitter.com/elasticsearchfr](https://twitter.com/elasticsearchfr) | @scrutmydocs  
> > [http://twitter.com/scrutmydocs](http://twitter.com/scrutmydocs)  
> > [https://twitter.com/scrutmydocs](https://twitter.com/scrutmydocs)
> > 
> > Le 22 septembre 2014 à 18:58:23, Terra Sacer ([terra...@gmail.com](mailto:terra...@gmail.com)) a  
> > écrit:
> > 
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com).  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/43261e05-aaee-48e8-9e2a-d1ce8abf7904%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/ae73f864-480b-4847-87f1-85ed4641d854%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/ae73f864-480b-4847-87f1-85ed4641d854%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/ae73f864-480b-4847-87f1-85ed4641d854%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/ae73f864-480b-4847-87f1-85ed4641d854%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/2d405c3c-a875-4673-8d55-7e97b448d3d3%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/2d405c3c-a875-4673-8d55-7e97b448d3d3%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:00am UTC](https://discuss.elastic.co/t/elasticsearch-does-not-compute-repeated-values-in-the-metric-aggregation/19918/6 "2017-07-06T01:00:28Z")

</div>


