Skip to content

Aggs: breadth_first does not work on several levels #9823

Closed
@jpountz

Description

@jpountz

Probably introduced in #9544 since I can reproduce the issue on master but not 1.x. The following recreation generates an error: Deferred collectors cannot be collected directly. They must be collected through the recording wrapper.

DELETE test

PUT test
{
  "mappings": {
    "test": {
      "properties": {
        "a": {
          "type": "string",
          "index": "no",
          "doc_values": "yes"
        },
        "b": {
          "type": "string",
          "index": "no",
          "doc_values": "yes"
        },
        "c": {
          "type": "string",
          "index": "no",
          "doc_values": "yes"
        }
      }
    }
  }
}

PUT test/test/1
{
  "a": "foo",
  "b": "bar",
  "c": "baz"
}

GET test/_search
{
  "aggs": {
    "a_terms": {
      "terms": {
        "field": "a",
        "collect_mode": "breadth_first"
      },
      "aggs": {
        "b_terms": {
          "terms": {
            "field": "b",
            "collect_mode": "breadth_first"
          },
          "aggs": {
            "c_terms": {
              "terms": {
                "field": "c"
              }
            }
          }
        }
      }
    }
  }
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions