Hi , I was playing around in the maps section of Kibana , which I havent used before ... and stumbled on the "join" section in the Documents layer. Although I have no specific use for it in terms of maps ... it piqued my interest for other applications.
Upon inspecting the developer console ... I found it submitting the following query
{
"size": 0,
"aggs": {
"join": {
"terms": {
"field": "ciClassKey",
"order": {
"_count": "desc"
},
"size": 10000
},
"aggs": {
"__kbnjoin__max_of_unitCount_groupby_metadata.*.ciClassKey": {
"max": {
"field": "unitCount"
}
}
}
}
},
"_source": {
"excludes": []
},
"stored_fields": [
"*"
],
"script_fields": {},
"docvalue_fields": [
{
"field": "lastdate",
"format": "date_time"
}
],
"query": {
"bool": {
"must": [],
"filter": [
{
"match_all": {}
}
],
"should": [],
"must_not": []
}
}
}
I couldnt actually get it to return any rows ...but was wondering if someone had some insight into the join aspect of it. Is it something we can use in normal ES queries ...or does Kibana pre-parse the query to do a separate second query to join the results from the first one on ?