Visualization: Display missing values on filter aggregation


Is there a way to include missing fields in filters aggregation like in terms aggregation?


You could nest under your terms agg?

Could you post your terms agg and also what you want the final response to look like? Just take the term agg response and edit it by hand, showing what you want to achieve.


missing aggregation is deprecated from ES. I already got it using the filter below on filters aggregation. Our use case favors filters agg for flexibility than term agg.


Thank you.

1 Like

Thanks a lot for coming back to post your solution!

Where did you get this?
The following code does not produce any deprecation notice AFAIK.

DELETE /sales
PUT /sales/_doc/1
  "foo": "bar",
  "price": 10
PUT /sales/_doc/2
  "foo": "bar"
POST /sales/_search?size=0
    "aggs" : {
        "products_without_a_price" : {
            "missing" : { "field" : "price" }

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