Skip to content

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

@dupuyjs

Description

@dupuyjs

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions