You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KIBANA 4 3beta
ES: 1.4.2
i'm trying to use nested fields as term field and it's not working i have. The problem is Kibana isn't constructing correctly aggregation for nested fields.
KIBANA 4 3beta
ES: 1.4.2
i'm trying to use nested fields as term field and it's not working i have. The problem is Kibana isn't constructing correctly aggregation for nested fields.
Generated by kibana (not working)
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": ""
}
},
"filter": {
"bool": {
"must": [
{
"query": {
"query_string": {
"query": ""
}
}
},
{
"range": {
"@timestamp": {
"gte": 1422745200000,
"lte": 1423516221647
}
}
}
],
"must_not": []
}
}
}
},
"size": 0,
"aggs": {
"2": {
"terms": {
"field": "ndc.pm",
"size": 5,
"order": {
"_count": "desc"
}
}
}
},
"fields": [
"*",
"_source"
],
"script_fields": {
"@timestamp": {
"script": "if (doc["@timestamp"].value == 0) { null } else { doc["@timestamp"].value }"
}
}
}
Eddited: (working)
{
"size": 0,
"aggs": {
"2": {
"nested": {
"path": "ndc"
},
"aggs": {
"2": {
"terms": {
"field": "ndc.pm"
}
}
}
}
}
}
{
"query": {
"filtered": {
"query": {
"query_string": {
"query": ""
}
},
"filter": {
"bool": {
"must": [
{
"query": {
"query_string": {
"query": ""
}
}
},
{
"range": {
"@timestamp": {
"gte": 1422745200000,
"lte": 1423516221647
}
}
}
],
"must_not": []
}
}
}
},
"size": 0,
"aggs": {
"2": {
"nested": {
"path": "ndc"
},
"aggs": {
"2": {
"terms": {
"field": "ndc.pm"
}
}
}
}
},
"fields": [
"*",
"_source"
],
"script_fields": {
"@timestamp": {
"script": "if (doc["@timestamp"].value == 0) { null } else { doc["@timestamp"].value }"
}
}
}
The text was updated successfully, but these errors were encountered: