WARNING: Version 1.5 of Elasticsearch has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Missing Aggregation
editMissing Aggregation
editA field data based single bucket aggregation, that creates a bucket of all documents in the current document set context that are missing a field value (effectively, missing a field or having the configured NULL value set). This aggregator will often be used in conjunction with other field data bucket aggregators (such as ranges) to return information for all the documents that could not be placed in any of the other buckets due to missing field data values.
Example:
{ "aggs" : { "products_without_a_price" : { "missing" : { "field" : "price" } } } }
In the above example, we get the total number of products that do not have a price.
Response:
{ ... "aggs" : { "products_without_a_price" : { "doc_count" : 10 } } }