i have an array of objects in elastic index and I need to display that into a Kibana visualization table.
Example - Parent-name, [ {Child-name, Child-age} ] (the row is the parent) and using Term aggregation for Parent-name and Child-name i get one line for each pair Parent - Child, but I cannot display the correct Child-age (Kibana display the same age for all Child of a parent)
(this is only a sample, the table structure is more complicated)
How can I access/display the correct Child-age ?
or
How can I access the value from an aggregation result from painless ? to iterate over the Child array and retrieve the correct Child-age.
LE: I cannot/want to change the index structure. Using nested fields is worst.
What version of Kibana are you using? There might be some features available on the latest releases that help in this situation that aren't on older versions.
Are you using the default distribution or the oss distribution of Kibana?
If on default distribution are you using the built-in basic license, or something else?
If you could post a couple of sample docs in a format that could be run in the Kibana dev tools console that would make it much easier for someone to try to find a solution.
Hi, I use 7.5.0 default distribution on a linux machine (debian) as dashboard app for our product https://prolion.com/en/restoremanager, as basic license.
We store in elastic some info from files systems, and one of the fiels is an array of ACL's (access control list).
I need a report where to show for each file, the user and his specific rights. One possibility is to present all of them in a single field, using painless code and formatting the content like an array , into a table visualization.
Using only as aggregation term i get the correct visualization, meaning more lines for a file, one for each user from the ACL object. But i am unable to add the corresponding rights for each user.
the best that i got was something like {
"script": {
"inline": "def l = new ArrayList(); for (item in params._source.aces_object) { l.add(item.name + ' ' + item.sid); } return l;",
"lang": "painless"
}
}
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.