elasticsearchsignificant-terms

Elasticsearch significant terms aggregation: meaning of doc_count and bg_count


I am having trouble finding documentation to explain the doc_count and bg_count fields in the response to the significant terms aggregation.

For example I would expect that, if I do not set a background filter, the bg_count should the the total number of documents in the index. However what I see is that the bg_count is not the same for each result, and it isn't anywhere near the total number of documents.

I assume that doc_count is the number of documents containing the returned key.

What is the actual meaning of these values? Where can I find more complete documentation for that?


Solution

  • Very simply: