Closed MrKuip closed 5 years ago
Hi @MrKuip , it seems that you are trying to ask Elasticsearch to sort your result by the output of Formula. This cannot be performed, because your Formula is computed in a Kibana context, based on the result of your query to Elasticsearch. As a matter of fact, Elastisearch knows nothing about your Formula, because it has not been computed yet. Regards
I' m asking kibana to sort.
The combobox 'order by' in kibana contains the metric 'metric Formula1'.
Are you saying that I should not choose that option because it doesnt work?
yes, this won't work because the sorting is executed by ES, before returning an answer to Kibana. Formula will be computed based on that answer. The Kibana UI lists any metric as a sorting choice, and we cannot prevent it to do so.
There is no simple way to circumvent this in Kibana.
Oke thanks for evaluating my issue.
Very cheeky question here: I believe this plugin will redundant if kibana supports the 'bucket script' aggregation. I'm using it now in 'Visual builder' and it works good but that has other problems.
Have you considered that you base this plugin on the 'bucket script' aggregation? This way ES will be responsible for sorting (and you have less code that can break)
In Kibana 6.6.2 I get a popup with the text:
Error in Visualisation agg is undefined
How to Reproduce:
The popup with "agg is undefined" will show.
The undefined variable agg can be found in './ui/public/courier/search_source/search_source.js'