Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for buckets sub aggregations (split series) #145

Open
dupuyjs opened this issue Jan 20, 2022 · 0 comments
Open

Add support for buckets sub aggregations (split series) #145

dupuyjs opened this issue Jan 20, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@dupuyjs
Copy link
Contributor

dupuyjs commented Jan 20, 2022

Add support for buckets sub aggregations (split series)

Provide a solution to split an existing primary aggregation using another one (for instance, following terms aggregation is split again using month date histogram, so each carrier bucket provide a count metric for each month).

image

  "aggs": {
    "3": {
      "terms": {
        "field": "Carrier",
        "order": {
          "_key": "desc"
        },
        "size": 5
      },
      "aggs": {
        "4": {
          "date_histogram": {
            "field": "timestamp",
            "calendar_interval": "1M",
            "time_zone": "Europe/Paris",
            "min_doc_count": 1
          }
        }
      }
    }
  },

The concept is to apply a new query on each individual bucket produced by Terms aggregation. Need some additional investigation but we can probably reuse the work done on TopHits with BuildPartitionQuery.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants