Understanding doc_count_error_upper_bound

So I read the docs but still a bit confused, or it's just not clicking....

If I use size: 512 I get doc_count_error_upper_bound: 45 and sum_other_doc_count: 29728
If I use size: 8192 (YES I know I should NOT use large numbers, just testing) I get doc_count_error_upper_bound: 0 and sum_other_doc_count: 0 which gives me an exact key count of 9.

So...

Does the result below with size: 512 mean,

  • that it has found 3 actual duplicates.
  • 29728 where NOT used to find the 3 duplicates?
  • 45 out of the total 75833 are potentially duplicates?

Request:

POST xxxxxx-2018.*/_search
{
  "query": {
    "bool": {
      "must": [
        {
          "match": {
            "message": "lookup"
          }
        }
      ],
      "must_not": []
    }
  },
  "size": 0,
  "aggs": {
    "duplicateNames": {
      "terms": {
        "field": "utid.keyword",
        "min_doc_count": 2,
        "size": 512,
         "show_term_doc_count_error": false
      }
    }
  }
}

Response:

{
  "took": 128,
  "timed_out": false,
  "_shards": {
    "total": 155,
    "successful": 155,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": 75833,
    "max_score": 0,
    "hits": []
  },
  "aggregations": {
    "duplicateNames": {
      "doc_count_error_upper_bound": 45,
      "sum_other_doc_count": 29728,
      "buckets": [
        {
          "key": "0d6d614c-e515-4449-9947-f662646c32f7",
          "doc_count": 2
        },
        {
          "key": "32465f7c-4f15-4012-a285-e3f6ad890882",
          "doc_count": 2
        },
        {
          "key": "f6d874a9-cfa9-4907-99ee-00215de0136f",
          "doc_count": 2
        }
      ]
    }
  }
}

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