Create an index pattern. Then go to saved objects - 'Unable find saved objects Error: Bad Request' popup shows up. This request:
/api/kibana/management/saved_objects/_find?perPage=20&page=1&fields=id&type=config&type=map&type=canvas-workpad&type=canvas-element&type=query&type=index-pattern&type=visualization&type=search&type=dashboard&type=url&sortField=type
fails with:
{"message":"all shards failed: [illegal_argument_exception] Fielddata is disabled on text fields by default. Set fielddata=true on [type] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.","statusCode":400,"error":"Bad Request"}
After some digging, I found out that the following query is executed:
> GET /.kibana/_search > { > "query": { > "terms": { > "type": [ > "dashboard", > "visualization", > "search", > "index-pattern", > "graph-workspace", > "timelion-sheet" > ] > } > }, > "aggs": { > "types": { > "terms": { > "field": "type", > "size": 10 > } > } > } > }
against .kibana index with following mapping:
{
".kibana" : {
"mappings" : {
"properties" : {
"config" : {
"properties" : {
"buildNum" : {
"type" : "long"
},
"defaultIndex" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
},
"index-pattern" : {
"properties" : {
"fields" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"timeFieldName" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"title" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
},
"migrationVersion" : {
"properties" : {
"index-pattern" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"space" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
},
"namespace" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"space" : {
"properties" : {
"_reserved" : {
"type" : "boolean"
},
"color" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"description" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"name" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
}
}
},
"telemetry" : {
"properties" : {
"enabled" : {
"type" : "boolean"
}
}
},
"type" : {
"type" : "text",
"fields" : {
"keyword" : {
"type" : "keyword",
"ignore_above" : 256
}
}
},
"ui-metric" : {
"properties" : {
"count" : {
"type" : "long"
}
}
},
"updated_at" : {
"type" : "date"
}
}
}
}
}
I wasn't touching the index in any way. Why is the autogenerated setup invalid?
ES and Kibana both 7.4