# Term\_stats return sometime return meaningless number

**URL:** <https://discuss.elastic.co/t/term-stats-return-sometime-return-meaningless-number/19472>\
**Category:** Elasticsearch\
**Created:** [August 26, 2014, 7:58pm UTC](https://discuss.elastic.co/t/term-stats-return-sometime-return-meaningless-number/19472 "2014-08-26T19:58:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![youwei\_chen](https://avatars.discourse-cdn.com/v4/letter/y/82dd89/32.png) [@youwei\_chen](https://discuss.elastic.co/u/youwei_chen)\
**Post date:** [August 26, 2014, 7:58pm UTC](https://discuss.elastic.co/t/term-stats-return-sometime-return-meaningless-number/19472/1 "2014-08-26T19:58:43Z")

</div>

Our elasticsearch instance sometime return meaningless number for  
terms\_stats, query return correct data.

I am using Kibana as front end, this is generated query:

{"facets":{"terms":{"terms\_stats":{"value\_field":"metric","key\_field":"host","size":10,"order":"count"},"facet\_filter":{"fquery":{"query":{"filtered":{"query":{"bool":{"should":[{"query\_string":{"query":"(service:".StorageProxy.RecentReadLatencyMicros")  
AND (layer:"cassandra") AND (@timestamp:[now-1m TO now]) AND  
host:169.26.4.167"}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"from":1408992976055,"to":"now"}}},{"terms":{"host":["169.26.4.167"]}},{"terms":{"host":["169.26.4.167"]}}]}}}}}}}},"size":0}

max=4.6366831074216192E+18  
mean=1.5455610358072064E+18  
min=0  
term=169.26.4.167  
total=4.6366831074216192E+18

the metric field would have some number between 0 and 100 while the term  
stat report huge number. If i delete index, it will show correct term  
stats again.

I tried refresh, close/open index, none seem to work except delete the  
index and recreate it. Have anyone face similar issue?

Thanks.

--  
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/5e141e56-7e01-4899-949f-c3d7f69a353d%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5e141e56-7e01-4899-949f-c3d7f69a353d%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![youwei\_chen](https://avatars.discourse-cdn.com/v4/letter/y/82dd89/32.png) [@youwei\_chen](https://discuss.elastic.co/u/youwei_chen)\
**Post date:** [August 26, 2014, 8:46pm UTC](https://discuss.elastic.co/t/term-stats-return-sometime-return-meaningless-number/19472/2 "2014-08-26T20:46:13Z")

</div>

Additional information:

take mean of boolean value return 4,607,182,418,800,017,408

Thanks

On Tuesday, August 26, 2014 3:58:43 PM UTC-4, youwei chen wrote:

> Our elasticsearch instance sometime return meaningless number for  
> terms\_stats, query return correct data.
> 
> I am using Kibana as front end, this is generated query:
> 
> {"facets":{"terms":{"terms\_stats":{"value\_field":"metric","key\_field":"host","size":10,"order":"count"},"facet\_filter":{"fquery":{"query":{"filtered":{"query":{"bool":{"should":[{"query\_string":{"query":"(service:".StorageProxy.RecentReadLatencyMicros")  
> AND (layer:"cassandra") AND (@timestamp:[now-1m TO now]) AND  
> host:169.26.4.167"}}]}},"filter":{"bool":{"must":[{"range":{"@timestamp":{"from":1408992976055,"to":"now"}}},{"terms":{"host":["169.26.4.167"]}},{"terms":{"host":["169.26.4.167"]}}]}}}}}}}},"size":0}
> 
> max=4.6366831074216192E+18  
> mean=1.5455610358072064E+18  
> min=0  
> term=169.26.4.167  
> total=4.6366831074216192E+18
> 
> the metric field would have some number between 0 and 100 while the term  
> stat report huge number. If i delete index, it will show correct term  
> stats again.
> 
> I tried refresh, close/open index, none seem to work except delete the  
> index and recreate it. Have anyone face similar issue?
> 
> Thanks.

--  
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/781d0077-93d4-4d1d-93ca-953e84704964%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/781d0077-93d4-4d1d-93ca-953e84704964%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![banwaitj](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@banwaitj](https://discuss.elastic.co/u/banwaitj)\
**Post date:** [July 30, 2015, 2:52pm UTC](https://discuss.elastic.co/t/term-stats-return-sometime-return-meaningless-number/19472/3 "2015-07-30T14:52:38Z")

</div>

Has anyone else seen this and resolved it as I am facing the same issue. The only way I have managed to fix this is to delete all the indexes which is not ideal. This is us from using this in live as this is less than ideal.

---

<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 5, 2017, 11:58pm UTC](https://discuss.elastic.co/t/term-stats-return-sometime-return-meaningless-number/19472/4 "2017-07-05T23:58:07Z")

</div>


