datasweet / kibana-datasweet-formula

This Kibana plugin allows calculated metrics on any standard kibana visualizations.
Apache License 2.0
121 stars 34 forks source link

order by in bucket by formular not working #20

Closed freakwave1111 closed 6 years ago

freakwave1111 commented 6 years ago

Hi, I really like your plugin. The only issue I have is when I try to use the new calculated metric to order my buckets, I am getting:

TypeError: Cannot read property 'filters' of undefined at http://localhost:5601/bundles/commons.bundle.js?v=16627:27:173794 at Array.forEach () at recurse (http://localhost:5601/bundles/commons.bundle.js?v=16627:27:173744) at http://localhost:5601/bundles/commons.bundle.js?v=16627:27:173939 at Array.forEach () at recurse (http://localhost:5601/bundles/commons.bundle.js?v=16627:27:173744) at http://localhost:5601/bundles/commons.bundle.js?v=16627:27:173977 at processQueue (http://localhost:5601/bundles/vendors.bundle.js?v=16627:58:132456) at http://localhost:5601/bundles/vendors.bundle.js?v=16627:58:133349 at Scope.$digest (http://localhost:5601/bundles/vendors.bundle.js?v=16627:58:144239)

orderby

image

Kind regards,

Wolfgang

lfroment-datasweet commented 6 years ago

Hi Wolfgang, first and foremost, Formula is processed within Kibana, this means you cannot ask Elasticsearch to order buckets based on Formula values, it simply does not see those values... But you first "order by" should not throw an error if it is based on an existing field in the index. we will try to reproduce. Is your Agg1 a scripted field? What is its mapping?

Regards