Hello all.
I'm developing a custom visualization (Angular-Visualization).
My gol is using the "top hit" aggregation and keep the last entry of a field of type String.
This is what happens: I select "top hit" as aggr but in the fields list only fields of type "number" are shown. Where are the string fields? .
I tried to replicate the same thing on the core-visualization: data-table; over there it works.
On the same index of course...
unfortunately, this hasn't been solved the best possible way, when this aggregation was introduced and is currently hard-coded to allow string values only for table and metric vis explicitly, see top_hit.js.
Please feel free to open a feature request for that on our repository, that we find a better way to let each vis configure that itself.
you would actually need to switch the name of your visualization to table. That's the ID of the visualization. But that way you will most likely break a lot of stuff, since you are now sharing the same ID than a build in visualization, so the vis system randomly will use one of the two vis implementations to load that stored visualization. So you might end up having your implementation handle actual table vis and vice versa. That's not what you want, so unfortunately you cannot or should not overwrite those ids.
Also as a side note: we are not recommending using createAngularVisualization anymore if you are currently starting to develop. We are currently in the process of removing Angular from Kibana (though you will still be able to use it by including it in your own plugin), but once we progress on that way, we'll actually deprecate that method and hopefully for 7.0 already remove it.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.