I want to add some additional properties to my mappings, in this specific case I want to modify a title field in my English index so that it would use the english analyzer.
Should be pretty straightforward, except that I have a title field in quite some types, and it seems to be not possible to do this.
The error I have is the following : Set update_all_types to true to update [search_quote_analyzer] across all types.]
But I am not able to find a single reference on how or where to set this 'update_all_types' parameter.
This is the very simple code I use in Sense :
PUT /my_index/_mapping/my_type
{
"properties": {
"title": {
"type": "string",
"analyzer": "english"
}
}
}
So, how can I make this work if the same field is used in other types ?
This is the error message :
"type": "illegal_argument_exception",
"reason": "Mapper for [title] conflicts with existing mapping in other types:
[mapper [title] has different [analyzer], mapper [title] is used by
multiple types. Set update_all_types to true to update [search_analyzer]
across all types., mapper [title] is used by multiple types. Set
update_all_types to true to update [search_quote_analyzer] across
all types.]"
So it seems I need to set 'update_all_types:true' somewhere, but the documentation fails on that part.
You can find the documentation here !
The update_all_types
is a get parameter to give like that :
PUT my_index/_mapping/type_one?update_all_types
I had a similar issue, try the code below to update all types:
PUT /my_index/_mapping/my_type?update_all_types
{
"properties": {
"title": {
"type": "string",
"analyzer": "english"
}
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With