mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
Sets update_all_types when setting mapping (#13991)
Prior to 5.6, we would push mappings once the object type was used. Since we are now ensuring all mappings are set, there is a situation where a field with type string exists but we are pushing text. You can not have a field with the same name, but different data type, in two different document types. To resolve this, we are setting update_all_types when updating mappings. Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
This commit is contained in:
parent
cf8d97f389
commit
d1e7b4cfb0
1 changed files with 4 additions and 2 deletions
|
@ -55,13 +55,15 @@ export async function ensureTypesExist({ log, indexName, callCluster, types }) {
|
|||
properties: {
|
||||
[type.name]: type.mapping
|
||||
}
|
||||
}
|
||||
},
|
||||
update_all_types: true
|
||||
});
|
||||
} else {
|
||||
await callCluster('indices.putMapping', {
|
||||
index: indexName,
|
||||
type: type.name,
|
||||
body: type.mapping
|
||||
body: type.mapping,
|
||||
update_all_types: true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue