elastic/elasticsearch

Allow Bucket Script aggregation to reference on string results

Chiusa

#36.642 aperta il 14 dic 2018

 (9 commenti) (4 reazioni) (0 assegnatari)Java (25.882 fork)batch import
:Analytics/Aggregations>enhancementTeam:Analyticshelp wanted

Metriche repository

Star
 (76.700 stelle)
Metriche merge PR
 (Merge medio 2g) (1000 PR mergiate in 30 g)

Descrizione

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?

Guida contributor