Monday, 15 June 2015

Computing tow columns with elasticsearch aggregation -



Computing tow columns with elasticsearch aggregation -

in example, there 2 columns, 1 querytime , 1 recordssize, want max value of querytime/recordssize elasticsearch aggregation, how result? help me? i'm looking forwards reply.

regards, alex

you need query this:

{ "aggs": { "max_time_per_records": { "max": { "script": "doc['querytime'].value/doc['recordssize'].value" } } } }

so, instead of max field, max script.

elasticsearch

No comments:

Post a Comment