Issue in creating mapping with _all field having different analyzer though in different index

I am stucked with below problem in production. Could you help me solve this

In Production i have two indices "hs" and "hsproduct".
In index "hs", i have type "product" whose mapping contains "_all" to some custom analyzer1. In index "hsproduct", i have type with same name as "product".
The issue when i try to PUT mapping file for type "product" in index "hsproduct" with _all analyzer as different "analyzer2", it gives me below error as

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [_all] conflicts with existing mapping in other types:\n[mapper [_all] has different [analyzer], mapper [_all] is used by multiple types. Set update_all_types to true to update [search_analyzer] across all types., mapper [_all] is used by multiple types. Set update_all_types to true to update [search_quote_analyzer] across all types.]"}],"type":"illegal_argument_exception","reason":"Mapper for [_all] conflicts with existing mapping in other types:\n[mapper [_all] has different [analyzer], mapper [_all] is used by multiple types. Set update_all_types to true to update [search_analyzer] across all types., mapper [_all] is used by multiple types. Set update_all_types to true to update [search_quote_analyzer] across all types.]"},"status":400}

Does this mean that _all field is shared across indices and i cannot use different analyzer though in different index.

Kinldy, help me solve this as it is in Production and i am stucked with no clue.

Thanks,
Naved

See https://www.elastic.co/guide/en/elasticsearch/guide/2.x/mapping-intro.html#updating-a-mapping

You can't change existing field mappings.
If you want to change _all field settings, you can only define when the index create.
You can use different analyzer each indices.

Thank You Jun.
I'll try out with your suggestion.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.