# Issue with min,max,mean

**URL:** <https://discuss.elastic.co/t/issue-with-min-max-mean/5262>\
**Category:** Elasticsearch\
**Created:** [August 27, 2011, 4:05am UTC](https://discuss.elastic.co/t/issue-with-min-max-mean/5262 "2011-08-27T04:05:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![einstein07](https://avatars.discourse-cdn.com/v4/letter/e/b5e925/32.png) [@einstein07](https://discuss.elastic.co/u/einstein07)\
**Post date:** [August 27, 2011, 4:05am UTC](https://discuss.elastic.co/t/issue-with-min-max-mean/5262/1 "2011-08-27T04:05:17Z")

</div>

Hi,

I have a mapping as below,

{"log\_1":{"properties":{"responsetime":{"index":"analyzed","type":"string"},"responsecode":{"index":"analyzed","type":"string"},"requesturl":{"type":"string"},"datetime":{"index":"analyzed","format":"dd/MMM/yyyy:HH:mm:ss Z","type":"date"},"bytessent":{"index":"analyzed","type":"string"},"ip":{"index":"analyzed","type":"string"},"fields":{"dynamic":"true","properties":{"responsetime":{"type":"integer"},"responsecode":{"type":"integer"},"requesturl":{"type":"string"},"datetime":{"format":"dd/MMM/yyyy:HH:mm:ss Z","type":"date"},"bytessent":{"type":"integer"},"ip":{"type":"ip"}}}}}}'

When I execute the below query,

{"query":{"match\_all":{}},"facets":{"user1":{"date\_histogram":{"field":"timestamp","interval":"second"},"facet\_filter":{"and":[{"range":{"timestamp":{"from":"1313661420000","to":"1413663400000"}}},{"term":{"text":"m2u"}}]}},"respsize":{"date\_histogram":{"key\_field":"timestamp","value\_field":"bytessent","interval":"minute"},"facet\_filter":{"and":[{"range":{"timestamp":{"from":"1313661420000","to":"1413663400000"}}},{"term":{"text":"m2u"}}]}},"resptime":{"date\_histogram":{"key\_field":"timestamp","value\_field":"responsetime","interval":"minute"},"facet\_filter":{"and":[{"range":{"timestamp":{"from":"1213661420000","to":"1313663400000"}}},{"term":{"text":"m2u"}}]}},"non200":{"date\_histogram":{"key\_field":"timestamp","value\_field":"responsetime","interval":"minute"},"facet\_filter":{"and":[{"range":{"timestamp":{"from":"1213661420000","to":"1313663400000"}}},{"bool":{"must\_not":{"term":{"responsecode":"200"}}}}]}}}}

I am not getting the correct results.. what I am getting is Infinity for min,max fields.

respsize: {  
\_type: date\_histogram  
entries: [  
{  
time: 1314353040000  
count: 1629  
min: Infinity  
max: -Infinity  
total: 0  
total\_count: 0  
mean: NaN  
}  
{  
time: 1314353220000  
count: 40568  
min: Infinity  
max: -Infinity  
total: 0  
total\_count: 0  
mean: NaN  
}  
{  
time: 1314353280000  
count: 1291  
min: Infinity  
max: -Infinity  
total: 0  
total\_count: 0  
mean: NaN  
}  
{  
time: 1314354240000  
count: 1719  
min: Infinity  
max: -Infinity  
total: 0  
total\_count: 0  
mean: NaN  
}  
{  
time: 1314409740000  
count: 311753  
min: Infinity  
max: -Infinity  
total: 0  
total\_count: 0  
mean: NaN  
}  
{  
time: 1314409800000  
count: 592187  
min: Infinity  
max: -Infinity  
total: 0  
total\_count: 0  
mean: NaN  
}  
]  
}

What is that I am missing?

---

<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, 3:55am UTC](https://discuss.elastic.co/t/issue-with-min-max-mean/5262/2 "2017-07-06T03:55:49Z")

</div>


