# Re: Term Facet count rounding

**URL:** <https://discuss.elastic.co/t/re-term-facet-count-rounding/4426>\
**Category:** Elasticsearch\
**Created:** [May 17, 2011, 4:53pm UTC](https://discuss.elastic.co/t/re-term-facet-count-rounding/4426 "2011-05-17T16:53:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [May 17, 2011, 4:53pm UTC](https://discuss.elastic.co/t/re-term-facet-count-rounding/4426/1 "2011-05-17T16:53:38Z")

</div>

There is no logic to do any rounding, so strange if you get it. First, ti recommended not to specify such a large size. Though in practice, in this case, it does not hurt, in other cases things can be pre allocated based on the provided size.

Can you provide a recreation?  
On Tuesday, May 17, 2011 at 7:35 PM, Ben Roubicek wrote:

> I am doing faceted search using ES 0.16 and getting term facet counts that appear to be rounded in the results. Is there any way to force the exact count to be returned?
> 
> Query:  
> {  
> "size":0,  
> "query":{  
> "constant\_score":{  
> "filter":{  
> "bool":{  
> "must":{  
> "or":{  
> "filters":[  
> {  
> "term":{  
> "attr\_str.company\_job\_title":"Homemaker"  
> }  
> },  
> {  
> "term":{  
> "attr\_str.company\_job\_title":"Doctor"  
> }  
> }  
> ]  
> }  
> }  
> }  
> }  
> }  
> },  
> "facets":{  
> "attr\_str.fields":{  
> "terms":{  
> "field":"attr\_str.fields",  
> "size":2147483647  
> }  
> }  
> }  
> }
> 
> Result  
> {  
> "took":107,  
> "timed\_out":false,  
> "\_shards":{  
> "total":5,  
> "successful":5,  
> "failed":0  
> },  
> "hits":{  
> "total":313000,  
> "max\_score":1.0,  
> "hits":[
> 
> ]  
> },  
> "facets":{  
> "attr\_str.fields":{  
> "_type":"terms",  
> "missing":2961590,  
> "terms":[  
> {  
> "term":"attr\_str\_loc.geolocation",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.state",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.list\_type",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.list\_name",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.last\_name",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.individual\_occupation",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.individual\_gender",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.first\_name",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.family\_member\_position",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.email",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.company\_job\_title",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.anglers\_indv\_code",  
> "count":313000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.individual\_age",  
> "count":313000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.household\_income",  
> "count":313000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.home\_value",  
> "count":313000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.home\_purchase\_price",  
> "count":313000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.hh\_ages\_present",  
> "count":313000  
> },  
> {  
> "term":"attr\_str.individual\_ethnicity",  
> "count":312000  
> },  
> {  
> "term":"attr\_str.wealth\_decile",  
> "count":311000  
> },  
> {  
> "term":"attr\_str.interest\_lifestyle",  
> "count":311000  
> },  
> {  
> "term":"attr\_str.consumer\_purchase\_methods",  
> "count":311000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.hh\_length\_of\_residence",  
> "count":311000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.household\_number\_of\_persons",  
> "count":310000  
> },  
> {  
> "term":"attr\_str.interest\_reading",  
> "count":309000  
> },  
> {  
> "term":"attr\_str.home\_\_owner_/\_renter\_code",  
> "count":309000  
> },  
> {  
> "term":"attr\_str.interest\_sports",  
> "count":308000  
> },  
> {  
> "term":"attr\_str.household\_marital\_status",  
> "count":308000  
> },  
> {  
> "term":"attr\_str.purchase\_interest",  
> "count":307000  
> },  
> {  
> "term":"attr\_str.credit\_cards\_owned",  
> "count":307000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.household\_number\_of\_adults",  
> "count":307000  
> },  
> {  
> "term":"attr\_str.interest\_hobbies",  
> "count":306000  
> },  
> {  
> "term":"attr\_str.dwell\_type",  
> "count":304000  
> },  
> {  
> "term":"attr\_str.household\_education\_level",  
> "count":302000  
> },  
> {  
> "term":"attr\_str.contributor\_interest",  
> "count":301000  
> },  
> {  
> "term":"attr\_str.interest\_musical",  
> "count":299000  
> },  
> {  
> "term":"attr\_str.religion",  
> "count":294000  
> },  
> {  
> "term":"attr\_str.propensity\_to\_contribute",  
> "count":291000  
> },  
> {  
> "term":"attr\_str.interest\_investment",  
> "count":283000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.number\_of\_children",  
> "count":283000  
> },  
> {  
> "term":"attr\_str.travel\_preference",  
> "count":279000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.year\_home\_built",  
> "count":264000  
> },  
> {  
> "term":"attr\_str.presence\_of\_children",  
> "count":241000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.discretionary\_spending\_index",  
> "count":236000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.credit\_rating",  
> "count":236000  
> },  
> {  
> "term":"attr\_str.pet\_ownership",  
> "count":225000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.num\_of\_housing\_units",  
> "count":206000  
> },  
> {  
> "term":"attr\_str.political\_affiliation",  
> "count":203000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.purchase\_year",  
> "count":181000  
> },  
> {  
> "term":"attr\_str.person\_type",  
> "count":156000  
> },  
> {  
> "term":"attr\_str.voter",  
> "count":154000  
> },  
> {  
> "term":"attr\_str.refinance\_indicator",  
> "count":143000  
> },  
> {  
> "term":"attr\_str.mortgage\_or\_refinance\_loan\_type",  
> "count":139000  
> },  
> {  
> "term":"attr\_str.type\_of\_home\_purchase",  
> "count":133000  
> },  
> {  
> "term":"attr\_str.soho\_indicator",  
> "count":117000  
> },  
> {  
> "term":"attr\_str.vehicle\_ownership",  
> "count":92000  
> },  
> {  
> "term":"attr\_str.type\_of\_fuel",  
> "count":90000  
> },  
> {  
> "term":"attr\_str.home\_air\_conditioning",  
> "count":90000  
> },  
> {  
> "term":"attr\_str.home\_pool\_type",  
> "count":70000  
> },  
> {  
> "term":"attr\_str.presence\_of\_fireplace",  
> "count":49000  
> },  
> {  
> "term":"attr\_lng\_rng\_title.mortgage\_term\_months",  
> "count":45000  
> },  
> {  
> "term":"attr\_str.mortgage\_or\_refinance\_interest\_rate\_type",  
> "count":38000  
> },  
> {  
> "term":"attr\_str.gender\_of\_children",  
> "count":16000  
> },  
> {  
> "term":"attr\_str.hispanic\_origin",  
> "count":8000  
> },  
> {  
> "term":"attr\_str.number\_of\_finance\_loans",  
> "count":7000  
> },  
> {  
> "term":"attr\_str.individual\_spoken\_language",  
> "count":5000  
> }  
> ]  
> }  
> }  
> }

---

<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, 4:05am UTC](https://discuss.elastic.co/t/re-term-facet-count-rounding/4426/2 "2017-07-06T04:05:56Z")

</div>


