kibana icon indicating copy to clipboard operation
kibana copied to clipboard

Nested field support

Open Alex-Ikanow opened this issue 11 years ago • 401 comments

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

Alex-Ikanow avatar Mar 21 '14 17:03 Alex-Ikanow

+1 for nested object aggregation.

shayts7 avatar Jan 21 '15 12:01 shayts7

+1

matthewgaulin avatar Jan 22 '15 22:01 matthewgaulin

+1

Charlesbot avatar Jan 23 '15 01:01 Charlesbot

+1

ghost avatar Jan 31 '15 18:01 ghost

+1

bzz avatar Feb 02 '15 02:02 bzz

+1

Kallin avatar Feb 02 '15 20:02 Kallin

+1

deepakas avatar Feb 05 '15 12:02 deepakas

+1

matogertel avatar Feb 18 '15 05:02 matogertel

+1

c0deaddict avatar Feb 20 '15 08:02 c0deaddict

+1

theNewFlesh avatar Feb 20 '15 18:02 theNewFlesh

+100000

krisb78 avatar Feb 21 '15 11:02 krisb78

+1

ddaumann avatar Feb 23 '15 19:02 ddaumann

to be clear, there is no way to do a nested filter/query/agg in kibana 4 right now, is there?

Kallin avatar Feb 24 '15 16:02 Kallin

+1

Medi0ker avatar Feb 25 '15 13:02 Medi0ker

+11111

ajrasch avatar Feb 26 '15 20:02 ajrasch

+1

calippo avatar Mar 02 '15 17:03 calippo

+1

polloelastico avatar Mar 02 '15 22:03 polloelastico

+1

Filirom1 avatar Mar 03 '15 19:03 Filirom1

+1

MichaelBorde avatar Mar 06 '15 14:03 MichaelBorde

+1

vordimous avatar Mar 06 '15 19:03 vordimous

+1

tonymwinters avatar Mar 10 '15 14:03 tonymwinters

+1

KevinFarrell avatar Mar 10 '15 20:03 KevinFarrell

+2

nbeede avatar Mar 12 '15 16:03 nbeede

+1

calvdee avatar Mar 13 '15 10:03 calvdee

+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"
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }

beiske avatar Mar 16 '15 00:03 beiske

+1

AjmalVh avatar Mar 16 '15 14:03 AjmalVh

+2

rvhaasen avatar Mar 19 '15 09:03 rvhaasen

+1

ryanrozich avatar Mar 20 '15 06:03 ryanrozich

+1

jonusko avatar Mar 20 '15 19:03 jonusko

+1

tweemeterjop avatar Mar 21 '15 12:03 tweemeterjop