Term aggregation not return accurate number of records

Hi There,

I am running ELasticSearch 6.0. i have a query with term aggregation to a "not-analyzed" field, but I am getting inaccurate count. i have set the size for aggregation to "100" as follows.

for example when set term aggregation for "title", i get

journal of biological chemistry (11)

but when explicitly search for "journal of biological chemistry" i get "14" records matching

"aggs": {
    
    "title": {
        "terms": {
            "field": "titlenav",
            "size": 100,
            "show_term_doc_count_error": true
        }
    }
}

Thanks

any update on this?

See shard_size and explanation why here: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-terms-aggregation.html#search-aggregations-bucket-terms-aggregation-approximate-counts

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.