Elasticsearch: Should range aggregations support the `missing` option?

Created on 7 Apr 2016  ·  3Comments  ·  Source: elastic/elasticsearch

Background for the discussion can be found at https://discuss.elastic.co/t/is-the-missing-value-option-officially-supported-in-date-range-aggregations/45855/4. The use-case seems to be about grouping missing values with uninteresting values.

:AnalyticAggregations >docs >test good first issue

Most helpful comment

I'd keep this, its definitely useful. And from what i understand missing is valid on most (all?) other bucket aggs

All 3 comments

We discussed this on FixIt friday and although this feature works today it's totally unsupported (we don't test it, we don't document it).

Pasting here a typical request:

GET myindex/user/_search
{
  "aggs": {
    "age_groups": {
      "date_range": {
        "field": "user_date_of_birth",
        "missing": "1899-12-31",
        "ranges": [
          {
              "key": "Generation Z",
              "from": "2000"
            },
            {
              "key": "Generation Y",
              "from": "1980",
              "to": "2000"
            },
            {
              "key": "Generation X",
              "from": "1965",
              "to": "1980"
            },
            {
              "key": "Baby Boomer",
              "from": "1946",
              "to": "1965"
            },
            {
              "key": "Silent Generation",
              "from": "1925",
              "to": "1946"
            },
            {
              "key": "Greatest Generation",
              "from": "1900",
              "to": "1925"
            },
            {
              "key": "Other",
              "to": "1900"
            }
        ]
      }
    }
  }
}

Everybody without any age or born before 1900 will fall in the Other bucket.

There might be interesting use cases coming from the UI team. @rashidkpc WDYT? Should we support officially that kind of feature or simply close this as a non supported/non documented feature we might remove at any time?

I'd keep this, its definitely useful. And from what i understand missing is valid on most (all?) other bucket aggs

Hi, I am new to GitHub public projects, so if possible I would like to make this my first contribution to the project to get my feet wet. Seems like this just involves writing some tests for this feature and documenting it? If there is any additional related information please let me know.
Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mayyamus picture mayyamus  ·  3Comments

malpani picture malpani  ·  3Comments

martijnvg picture martijnvg  ·  3Comments

ttaranov picture ttaranov  ·  3Comments

matthughes picture matthughes  ·  3Comments