elastic/elasticsearch

Allow Bucket Script aggregation to reference on string results

クローズ

#36,642 opened on 2018/12/14

 (9 件のコメント) (4 件のリアクション) (0 人の担当者)Java (25,882 件のフォーク)batch import
:Analytics/Aggregations>enhancementTeam:Analyticshelp wanted

Repository metrics

Stars
 (76,700 個のスター)
PR merge metrics
 (平均マージ 2d) (30d で 1,000 merged PRs)

説明

Currently bucket script aggregations allows only numbers to be referenced on:

      "some-stringified-metric":{  
          "bucket_script":{  
            "buckets_path":{  
              "a":"path>of>nested>metrics>agg_that_returns_a_string.value"
            },
            "script":{  
              "source":"params.a"
            }
          }
        },

You will get: "buckets_path must reference either a number value or a single value numeric metric aggregation, got: java.lang.String"

Result of the agg is just a string, not a list of object, or something complex. Why plain single strings are so offended that they can not be returned as a result?

コントリビューターガイド