Hi all,
I got an exception while trying to use a script aggregation in Kibana using the json input:
I can reproduce the error in Dev Tools when I specify both the field and the script for the same aggregation:
GET online/_search?size=0
{
"aggs": {
"tag": {
"terms": {
"field": "tag.keyword",
"script": {
"source": "doc['tag.keyword']",
"lang": "painless"
}
}
}
}
}
If I remove the field attribute, everything is working perfectly:
GET online/_search?size=0
{
"aggs": {
"tag": {
"terms": {
"script": {
"source": "doc['tag.keyword']",
"lang": "painless"
}
}
}
}
}
But Kibana does not allow me to use JSON input without specifying a field in aggregation.
I am using version 5.6.7.
Thank you for you help,
Aurelien