Term aggregation not return accurate number of records


(Hanan) #1

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


(Hanan) #2

any update on this?


(Mark Harwood) #3

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


(system) #4

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