Cannot update parameter analyzer from autocomplete to default

Hello all, I have no prior knowledge on ES and I'm trying to make an old code written for elasticsearch 6.5 to work on the 7.3 version.

So far I got the code updated and running however I can't understand why during re-index process I got this problem:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Mapper for [title] conflicts with existing m
  apper:\n\tCannot update parameter [analyzer] from [autocomplete] to [default]"}],"type":"illegal_argument_exception
  ","reason":"Mapper for [title] conflicts with existing mapper:\n\tCannot update parameter [analyzer] from [autocomplete] to [default]"},"status":400}

There's nothing else indexed

curl http://localhost:9200/_aliases?pretty
{ }

Here's the definition for the fields

$params = [
            'index' => config('search.index').'-session-info-pages',
            'body' => [
                'settings' => [
                    'analysis' => [
                        'filter' => [
                            'autocomplete' => [
                                'type' => 'edgeNGram',
                                'min_gram' => '1',
                                'max_gram' => '20',
                                'token_chars' => [
                                    'letter',
                                    'digit',
                                ],
                            ],
                            'english_stemmer' => [
                                'type' => 'stemmer',
                                'language' => 'light_english',
                            ],
                            'english_possessive_stemmer' => [
                                'type' => 'stemmer',
                                'language' => 'possessive_english',
                            ],
                        ],
                        'analyzer' => [
                            'folding' => [
                                'tokenizer' => 'standard',
                                'filter' => [
                                    'english_possessive_stemmer',
                                    'lowercase',
                                    'english_stemmer',
                                    'asciifolding',
                                ],
                            ],
                            'autocomplete' => [
                                'tokenizer' => 'standard',
                                'char_filter' => [
                                    'html_strip',
                                ]
                                'filter' => [
                                    'lowercase',
                                    'autocomplete',
                                ],
                            ],
                            'str_search_analyzer' => [
                                'tokenizer' => 'standard',
                                'char_filter' => [
                                    'html_strip',
                                ],
                                'filter' => [
                                    'english_possessive_stemmer',
                                    'lowercase',
                                    'english_stemmer',
                                    'asciifolding',
                                ],
                            ],
                        ],
                    ],
                ],
                'mappings' => [
                        'properties' => [
                            'title' => [
                                'type' => 'text',
                                'analyzer' => 'autocomplete',
                                'search_analyzer' => 'str_search_analyzer',
                                'fields' => [
                                    'folded' => [
                                        'type' => 'text',
                                        'analyzer' => 'folding',
                                    ],
                                ],
                            ],
                            'body' => [
                                'type' => 'text',
                                'analyzer' => 'autocomplete',
                                'search_analyzer' => 'str_search_analyzer',
                                'fields' => [
                                    'folded' => [
                                        'type' => 'text',
                                        'analyzer' => 'folding',
                                    ],
                                ],
                            ],
                            'start_date' => [
                                'type' => 'long',
                            ],
                            'end_date' => [
                                'type' => 'long',
                            ],
                            'index_image' => [
                                'type' => 'text',
                            ],
                            'fd_key' => [
                                'type' => 'text',
                            ],
                            'alias' => [
                                'type' => 'text',
                            ],
                        ],
                ],
            ],
        ];

Please, would anybody able to help me with this problem?
Thank you in advance.

I have the same issue, did you figure out a solution?

So far no one was able to help me. The problem is still unsolved.

I deleted my indices and reindexed and problem went away

That did not work for me. Even creating a whole new cluster with no indices the problem keeps occurring. As I'm not an expert on ES I'm afraid we will have to migrate the ES solution we have to use another company.

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