# Add mapping response mapper\_exception in ElasticSearch

**URL:** <https://discuss.elastic.co/t/add-mapping-response-mapper-exception-in-elasticsearch/379696>\
**Category:** Elastic Search\
**Created:** [July 2, 2025, 6:33am UTC](https://discuss.elastic.co/t/add-mapping-response-mapper-exception-in-elasticsearch/379696 "2025-07-02T06:33:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreAT](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreat/32/140410_2.png) [@AndreAT](https://discuss.elastic.co/u/AndreAT)\
**Post date:** [July 2, 2025, 6:33am UTC](https://discuss.elastic.co/t/add-mapping-response-mapper-exception-in-elasticsearch/379696/1 "2025-07-02T06:33:30Z")

</div>

Hi,  
I need synonyms for searching my documents and mainly fellow some monuals published, eg.

> **[Search with synonyms | Elastic Docs](https://www.elastic.co/docs/solutions/search/full-text/search-with-synonyms)**
>
> Synonyms are words or phrases that have the same or similar meaning. They are an important aspect of search, as they can improve the search experience...

```
POST /my_index/_close
PUT /my_index/_settings
{
  "settings": {
    "analysis": {
      "filter": {
        "my_synonym_filter": {
          "type": "synonym",
          "synonyms_path": "synonyms.txt",
		  "updateable": true
        }
      },
      "analyzer": {
        "my_synonym_analyzer": {
          "tokenizer": "standard",
          "filter": [
            "lowercase",
            "my_synonym_filter"
          ]
        }
      }
    }
  }
}

```

Now I like to assign **my\_synonym\_analyzer** to the field **content** using this request:

```
PUT /my_index/_mapping
{
  "properties": {
    "content": {
      "type": "text",
      "analyzer": "my_synonym_analyzer"
    }
  }
}

```

But the result reports an error:

```
{
  "error": {
    "root_cause": [
      {
        "type": "mapper_exception",
        "reason": "analyzer [my_synonym_analyzer] contains filters [my_synonym_filter] that are not allowed to run in index time mode."
      }
    ],
    "type": "mapper_parsing_exception",
    "reason": "Failed to parse mapping: analyzer [my_synonym_analyzer] contains filters [my_synonym_filter] that are not allowed to run in index time mode.",
    "caused_by": {
      "type": "mapper_exception",
      "reason": "analyzer [my_synonym_analyzer] contains filters [my_synonym_filter] that are not allowed to run in index time mode."
    }
  },
  "status": 400
}

```

I study a couple of tutorials but it seems that's a common way to assign the mapping.  
Version is 8.15.1 and field type of **content** is text what I already checked.  
Any idea what I'm doing wrong?

Thanks,  
Andre

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [July 2, 2025, 8:59am UTC](https://discuss.elastic.co/t/add-mapping-response-mapper-exception-in-elasticsearch/379696/2 "2025-07-02T08:59:49Z")

</div>

Hi @AndreAT,

Welcome! I believe your issue is down to the `updateable` option. There is a similar issue with a corresponding fix [here to use separate search and index analysers](https://discuss.elastic.co/t/synonyms-filter-doesnt-work-in-all-modes-when-indexing/223071).

Hope that helps!

---

<div class="post-metadata">

**Author:** ![AndreAT](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreat/32/140410_2.png) [@AndreAT](https://discuss.elastic.co/u/AndreAT)\
**Post date:** [July 2, 2025, 9:22am UTC](https://discuss.elastic.co/t/add-mapping-response-mapper-exception-in-elasticsearch/379696/3 "2025-07-02T09:22:38Z")

</div>

Hi Carly,  
thank you.  
I tried this also but with the same result.  
What I tried was to overwrite - maybe I have to delete settings before (how to do?)?  
With updateable : false it also doesn't work.

Thank you,  
Andre

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [July 2, 2025, 12:24pm UTC](https://discuss.elastic.co/t/add-mapping-response-mapper-exception-in-elasticsearch/379696/4 "2025-07-02T12:24:01Z")

</div>

Ok, can you perhaps share what you're trying to do? What do you mean by:

> With updateable : false it also doesn't work.

As in you receive the same error? Did you delete the index before recreating it?

---

<div class="post-metadata">

**Author:** ![AndreAT](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andreat/32/140410_2.png) [@AndreAT](https://discuss.elastic.co/u/AndreAT)\
**Post date:** [July 2, 2025, 3:05pm UTC](https://discuss.elastic.co/t/add-mapping-response-mapper-exception-in-elasticsearch/379696/5 "2025-07-02T15:05:35Z")

</div>

Yes, I tried to change updateable and run it like this:

> [@AndreAT](#):
>
> ```auto
> "analysis": {
> "filter": {
> "my_synonym_filter": {
> "type": "synonym",
> "synonyms_path": "synonyms.txt",
> "updateable": false
> }
> },
> 
> ```

But than I get the previous error again after executing.

```auto
PUT /my_index/_mapping
{
  "properties": {
    "content": {
      "type": "text",
      "analyzer": "my_synonym_analyzer"
    }
  }
}

```

I tried to deleted the index and now another error occurs so I expect the issue is fine, thank you.

```auto
{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": """Mapper for [content] conflicts with existing mapper:
	Cannot update parameter [analyzer] from [default] to [my_synonym_analyzer]"""
      }
    ],
    "type": "illegal_argument_exception",
    "reason": """Mapper for [content] conflicts with existing mapper:
	Cannot update parameter [analyzer] from [default] to [my_synonym_analyzer]"""
  },
  "status": 400
}

```

I get now - I think I have to delete existing mapper first.

---

<div class="post-metadata">

**Author:** ![carly.richmond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carly.richmond/32/104935_2.png) [@carly.richmond](https://discuss.elastic.co/u/carly.richmond)\
**Post date:** [July 3, 2025, 9:02am UTC](https://discuss.elastic.co/t/add-mapping-response-mapper-exception-in-elasticsearch/379696/6 "2025-07-03T09:02:42Z")

</div>

Yes, try deleting the existing mapper and recreating. Let us know how you get on.
