Failed to update mapping for index, failure org.elasticsearch.index.mapper.MapperParsingException: Failed to parse mapping: analyzer [jobtitle_synonym_analyzer] contains filters [jobtitle_synonym_filter] that are not allowed to run in index time mode

When I restore the Index with the use of snapshot, It restored successfully but, I am getting an error called all shards are failed. When I search for an Explaination It shows that failed to update mapping for index, failure org.elasticsearch.index.mapper.MapperParsingException: Failed to parse mapping: analyzer [jobtitle_synonym_analyzer] contains filters [jobtitle_synonym_filter] that are not allowed to run in index time mode
How can I solve this, I need to restore that index With all shards successfully

I tried to update the setting of that particular index but, it wasn't Working

On which version was the index created? Which version are you running now?

previously I am using 7.2.0 Now, I tried to restore it in 8.7.0

Was the index created in version 7.2 or might it have been migrated from an earlier version?

To troubleshoot I would recommend restoring the index into a 7.17 cluster and running the migration wizard to see if there are any issues that would prevent it from being usable in version 8.7.

Which is migrated from the earlier version. Here is my setting

   "settings":{
      "analysis":{
         "filter":{
            "skill_synonym_filter":{
               "type":"synonym",
               "synonyms_path":"skill_synonyms.csv",
               "updateable":true
            },
            "jobtitle_synonym_filter":{
               "type":"synonym",
               "synonyms_path":"job_title_synonyms.csv",
               "updateable":true
            },
            "degree_synonym_filter":{
               "type":"synonym",
               "synonyms_path":"degree_synonyms.csv",
               "updateable":true
            },
            "custom_shingle":{
               "type":"shingle",
               "min_shingle_size":2,
               "max_shingle_size":3,
               "output_unigrams":true
            },
            "my_char_filter":{
               "type":"pattern_replace",
               "pattern":" ",
               "replacement":""
            }
         },
         "analyzer":{
            "keyword_analyzer":{
               "filter":[
                  "lowercase",
                  "asciifolding",
                  "trim"
               ],
               "char_filter":[

               ],
               "type":"custom",
               "tokenizer":"keyword"
            },
            "skill_synonym_analyzer":{
               "type":"custom",
               "tokenizer":"keyword",
               "filter":[
                  "lowercase",
                  "asciifolding",
                  "skill_synonym_filter"
               ]
            },
            "jobtitle_synonym_analyzer":{
               "type":"custom",
               "tokenizer":"keyword",
               "filter":[
                  "lowercase",
                  "asciifolding",
                  "jobtitle_synonym_filter"
               ]
            },
            "degree_synonym_analyzer":{
               "type":"custom",
               "tokenizer":"keyword",
               "filter":[
                  "lowercase",
                  "degree_synonym_filter"
               ]
            },
            "stem_analyzer":{
               "filter":[
                  "lowercase",
                  "asciifolding",
                  "trim",
                  "stemmer"
               ],
               "char_filter":[

               ],
               "type":"custom",
               "tokenizer":"keyword"
            },
            "edge_ngram_analyzer":{
               "filter":[
                  "lowercase"
               ],
               "tokenizer":"edge_ngram_tokenizer"
            },
            "edge_ngram_search_analyzer":{
               "tokenizer":"lowercase"
            },
            "word_combiner_analyzer":{
               "tokenizer":"standard",
               "filter":[
                  "lowercase",
                  "custom_shingle",
                  "my_char_filter"
               ]
            },
            "word_combiner_skill_synonym_analyzer":{
               "type":"custom",
               "tokenizer":"keyword",
               "filter":[
                  "lowercase",
                  "asciifolding",
                  "skill_synonym_filter",
                  "custom_shingle",
                  "my_char_filter"
               ]
            },
            "word_combiner_jobtitle_synonym_analyzer":{
               "type":"custom",
               "tokenizer":"keyword",
               "filter":[
                  "lowercase",
                  "asciifolding",
                  "jobtitle_synonym_filter",
                  "custom_shingle",
                  "my_char_filter"
               ]
            },
            "word_combiner_degree_synonym_analyzer":{
               "type":"custom",
               "tokenizer":"keyword",
               "filter":[
                  "lowercase",
                  "asciifolding",
                  "degree_synonym_filter",
                  "custom_shingle",
                  "my_char_filter"
               ]
            },
            "word_combiner_keyword_analyzer":{
               "filter":[
                  "lowercase",
                  "asciifolding",
                  "trim",
                  "custom_shingle",
                  "my_char_filter"
               ],
               "char_filter":[

               ],
               "type":"custom",
               "tokenizer":"keyword"
            }
         },
         "tokenizer":{
            "edge_ngram_tokenizer":{
               "token_chars":[
                  "letter"
               ],
               "min_gram":"2",
               "type":"edge_ngram",
               "max_gram":"5"
            }
         }
    ```
Could you please Tell me proper way to restore it??

Which is very long way that restore it in 7.17 again take a snapshot from that cluster again strore it in 8.7.0. In this process we need to install elasticsearch7.17.

Suggest me a best way to avoid that error

There are limited options when restoring an index so if it causes a problem already at startup I do not see any way to automatically fix it. In order to see if there is anything with the index that is cauing an issue you need to check it with the migration assistant available in 7.17.

I do not recognise this error but maybe someone else have seen it before and knows how to get around it.

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