# Cannot update parameter analyzer from autocomplete to default

**URL:** <https://discuss.elastic.co/t/cannot-update-parameter-analyzer-from-autocomplete-to-default/277257>\
**Category:** Elasticsearch\
**Created:** [June 28, 2021, 5:14pm UTC](https://discuss.elastic.co/t/cannot-update-parameter-analyzer-from-autocomplete-to-default/277257 "2021-06-28T17:14:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luiz\_Firmino](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luiz_firmino/32/90921_2.png) [@Luiz\_Firmino](https://discuss.elastic.co/u/Luiz_Firmino)\
**Post date:** [June 28, 2021, 5:14pm UTC](https://discuss.elastic.co/t/cannot-update-parameter-analyzer-from-autocomplete-to-default/277257/1 "2021-06-28T17:14:27Z")

</div>

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:

```auto
{"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

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

```

Here's the definition for the fields

```auto
$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.

---

<div class="post-metadata">

**Author:** ![epinault](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/epinault/32/91769_2.png) [@epinault](https://discuss.elastic.co/u/epinault)\
**Post date:** [July 16, 2021, 8:10pm UTC](https://discuss.elastic.co/t/cannot-update-parameter-analyzer-from-autocomplete-to-default/277257/2 "2021-07-16T20:10:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Luiz\_Firmino](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luiz_firmino/32/90921_2.png) [@Luiz\_Firmino](https://discuss.elastic.co/u/Luiz_Firmino)\
**Post date:** [July 20, 2021, 2:07pm UTC](https://discuss.elastic.co/t/cannot-update-parameter-analyzer-from-autocomplete-to-default/277257/3 "2021-07-20T14:07:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![epinault](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/epinault/32/91769_2.png) [@epinault](https://discuss.elastic.co/u/epinault)\
**Post date:** [July 21, 2021, 2:53pm UTC](https://discuss.elastic.co/t/cannot-update-parameter-analyzer-from-autocomplete-to-default/277257/4 "2021-07-21T14:53:31Z")

</div>

I deleted my indices and reindexed and problem went away

---

<div class="post-metadata">

**Author:** ![Luiz\_Firmino](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luiz_firmino/32/90921_2.png) [@Luiz\_Firmino](https://discuss.elastic.co/u/Luiz_Firmino)\
**Post date:** [July 26, 2021, 11:04pm UTC](https://discuss.elastic.co/t/cannot-update-parameter-analyzer-from-autocomplete-to-default/277257/5 "2021-07-26T23:04:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 23, 2021, 11:04pm UTC](https://discuss.elastic.co/t/cannot-update-parameter-analyzer-from-autocomplete-to-default/277257/6 "2021-08-23T23:04:46Z")

</div>

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