elastic/elasticsearch

Allow Bucket Script aggregation to reference on string results

已关闭

#36,642 创建于 2018年12月14日

 (9 条评论) (4 个反应) (0 位负责人)Java (25,882 个派生)batch import
:Analytics/Aggregations>enhancementTeam:Analyticshelp wanted

仓库指标

星标
 (76,700 个星标)
PR 合并指标
 (平均合并 2天) (30 天内合并 1,000 个 PR)

描述

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?

贡献者指南