Elasticsearch illegal_argument_exception error

Hi All,

I'm working on a rails 5.0.6 project with Elasticsearch 2.4. I'm using searchkick. My question is, I'm getting the following error when I try to reindex. (I understand some of the values in the error is maybe specific to my case)

{"type"=>"illegal_argument_exception", "reason"=>"Mapper for [body] conflicts with existing mapping in other types:\n[mapper [body] has different [index] values, mapper [body] has different [analyzer], mapper [body] is used by multiple types. Set update_all_types to true to update [search_analyzer] across all types., mapper [body] is used by multiple types. Set update_all_types to true to update [search_quote_analyzer] across all types.]"}

Can someone please explain me this error on what it means and help me to understand what might be causing this issue. Then I can check the code and fix it.

I have found some articles on the web, but still not fully understand what causing the error

thanks in advance,

I've posted the same question in SO too

cheers,

Sam

This means that multiple types within the same index has fields with same name but with conflicting field mapping. You need to inspect the types within the same index and make sure that all mappings with the same field name, between different types, are all equal.

This is one of the reasons that types has been deprecated.

1 Like

hey @thiago, thanks I'll check the indexes

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