Closed
Description
Both Kibana and SQL have logic on top of the _field_caps
API to detect when a conflict is harmful versus when it's not. Part of how it works is by grouping field types into families of fields: conflicts are fine as long as the types across indices are all of the same family.
Should we move this logic to _field_caps
instead?
Here is an example of how we could collapse fields:
number
:long
,integer
,double
,float
,scaled_float
, ...date
:date
,date_nanos
keyword
:keyword
,constant_keyword
,wildcard
text
:text
geo
:geo_point
,geo_shape
Most other fields would be their own family as they don't share properties with other fields, e.g. boolean
or flattened
.
So for instance, the below response today is considered a conflict:
{
"indices": ["index1", "index2", "index3", "index4", "index5"],
"fields": {
"rating": {
"double": {
"searchable": true,
"aggregatable": true,
"indices": ["index1", "index2"]
},
"float": {
"searchable": true,
"aggregatable": true,
"indices": ["index3", "index4"],
}
}
}
}
While it wouldn't be one if we collapsed double
and float
into a number
"family".