Test index mapping with no documents:
PUT ip_index2
{
"mappings": {
"_doc": {
"properties": {
"source": {
"type":"text",
"fields": {
"keyword": {
"type":"keyword"
}
}
},
"country": {
"type": "keyword"
}
}
}
}
}
The following query select source,count(distinct country) from ip_index2 group by source having count(distinct country)>5 generates an error:
Server error [Server sent bad type [illegal_argument_exception]. Original type was [Two sibling aggregations cannot have the same name: [1777]]. [java.lang.IllegalArgumentException: Two sibling aggregations cannot have the same name: [1777]