Open Alex-Ikanow opened 10 years ago
+1 for nested object aggregation.
+1
+1
+1
+1
+1
+1
+1
+1
+1
+100000
+1
to be clear, there is no way to do a nested filter/query/agg in kibana 4 right now, is there?
+1
+11111
+1
+1
+1
+1
+1
+1
+1
+2
+1
+1 Because denormalizing nested objects is not always an option as this may lead to a mapping explosion.
Mapping:
{
"timestamp":{ "type":"date"},
"cluster_id": { "type":"string"},
"pools":{
"type":"nested",
"properties":{
"size":{
"type":"long"
},
"name":{
"type":"string",
"index":"not_analyzed"
}
}
}
}
First of all I would like to the line chart to be able to show the average size over time for each pool name. Assuming that there are that many names so that denormalizing is not a good idea, this might lead to many graphs in the chart. In order to work with such cases it would also be beneficial to be able to use the filter agregation inside a nested aggregation. Being able to filter on nested fields in the top search would also be great.
To make things even more interresting it would be really great to be able to visualize an aggregation like this:
"aggs": {
"poolagg": {
"nested": {
"path": "pools"
},
"aggs": {
"old": {
"filter": {
"term": {
"name": "some pool name"
}
},
"aggs": {
"avg_size": {
"avg": {
"field": "size"
}
},
"distribution": {
"histogram": {
"field": "size",
"interval": 5
},
"aggs": {
"pool_to_cluster": {
"reverse_nested": {},
"aggs": {
"clusters": {
"cardinality": {
"field": "cluster_id"
}
}
}
}
}
}
}
}
}
}
}
+1
+2
+1
+1
+1
+1
+10 !
It would be powerfull with this !
So can someone clarify this; In this post (https://www.elastic.co/blog/kibana-4-beta-1-released) for Kibana4beta1 it states that "Kibana 4 brings the power of Elasticsearch's nested aggregations to the click of a mouse. " However I'm unable to create any visualizations on documents with nested objects. I've also made sure the nested objects in my index template are marked as "nested". So is Kibana's support for nested aggregations not the same as ES's support for nested objects? What am I missing? Thanks.
@cslinuxboy - I think they're using "nested" here to refer to grouping via multiple fields, eg "aggregate by time then geo" (not "nested" as in its use in the platform for "nested objects")
@Alex-Ikanow - Thanks for the reply. Too bad this is not possible at this time. I got my hopes up when reading the misleading description on their beta-1 post.
+1 for support of nested objects within visualization aggregation.
+1
I'm currently using parent/child relationships as a workaround which seems to be working fine.
@calvdee Have you got has_parent or has_child queries to work in the Kibana search bar? This isn't working for us and it's a huge problem, I would be ETERNALLY grateful if you have this working and can let me know...thanks!!!
No, for our use case all parents have children and all children necessarily have parents since we are indexing invoice data so regular queries just work (see image).
@calvdee Thanks so much for the reply! We have a similar data model but want to be able to find parents by their children in Kibana, it's not working :0(
No worries, good luck!
On Thu, Mar 26, 2015, 11:36 ajrasch notifications@github.com wrote:
@calvdee https://github.com/calvdee Thanks so much for the reply! We have a similar data model but want to be able to find parents by their children in Kibana, it's not working :0(
— Reply to this email directly or view it on GitHub https://github.com/elastic/kibana/issues/1084#issuecomment-86575796.
+1
+1
You read the _mapping field, so you should know when a particular field is nested, so can it not automatically apply the correct nested facet/query when such a field is selected in queries or facets?
Yes, :+1: on this one. Although I managed to write the correct nested aggregation on CLI, and can pull data with curl, I haven't found a way to get it working in Kibana's "Visualise" tab, not even using the JSON edit box. Admittedly, I never use that feature (the box), but it seems that it is possible only to "add" stuff to an existing aggregation, not to use it for creating a new aggregation from scratch... (will appreciate to be corrected if I am wrong on this!).
Yes, nested type aggregations are key and becoming more widely used because they solve a specific problem with flat data.
If Kibana4 is the visualization product for ES, it should support all ES aggregations.
It would be nice to at least see this on the roadmap for Kibana4.
+1
+1
+1
+1
+1
This is sort of a duplicate of some other issues I searched for but I haven't seen this particular aspect discussed, so I thought this was worth a separate issue.
You read the _mapping field, so you should know when a particular field is nested, so can it not automatically apply the correct nested facet/query when such a field is selected in queries or facets?
(Alternatively/in addition as suggested by #532, you could have a checkbox to allow users to select it themselves, perhaps as an interim measure)
I'm sure there are some cases where this gets complicated, but there are also a bunch of cases where it's a straightforward changing of one block of JSON to another.
Latest update: https://github.com/elastic/kibana/issues/1084#issuecomment-585178079