title: Add sub-aggregation to bucket_selector aggregation
body: <p>So I have this query with two levels of aggregation and filter aggregation named <code>timestamps_bucket_filter</code></p>
  
  <pre><code>{
    "size": 0,
    "aggregations": {
      "colors": {
        "terms": {
          "field": "color"
        },
        "aggregations": {
          "timestamps": {
            "date_histogram": {
              "field": "timestamp",
              "interval": "1m",
              "order": {
                "_key": "desc"
              }
            },
            "aggregations": {
              "timestamps_bucket_filter": {
                "bucket_selector": {
                  "buckets_path": {
                    "counterts": "_count"
                  },
                  "script": {
                    "lang": "expression",
                    "script": "counterts &lt;= 50"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>Now, what I would like to do is to add another sub-aggregation below <code>timestamps_bucket_filter</code>, something like:</p>
  
  <pre><code>{
    "size": 0,
    "aggregations": {
      "colors": {
        "terms": {
          "field": "color"
        },
        "aggregations": {
          "timestamps": {
            "date_histogram": {
              "field": "timestamp",
              "interval": "1m",
              "order": {
                "_key": "desc"
              }
            },
            "aggregations": {
              "timestamps_bucket_filter": {
                "bucket_selector": {
                  "buckets_path": {
                    "counterts": "_count"
                  },
                  "script": {
                    "lang": "expression",
                    "script": "counterts &lt;= 50"
                  }
                },
                "aggregations": {                &lt;-- I would like to add this aggregation
                  "name": {
                    "terms": {
                      "field": "name"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  </code></pre>
  
  <p>Unfortunately, I am getting <code>Aggregation [timestamps_bucket_filter] cannot define sub-aggregations</code></p>
  
  <p>Is there any workaround for that barrier. I am really need to get those names under the filter-script I have created.</p>
  
  <p>Thanks in advance.</p>