user image

Eslam Zedan
Published in : 2022-02-24

Problem while upgradeing elastic from 1.4 to 7.0

Elasticsearch

Hello,

I have an index mapping that has  dynamic_templates  that use groovy but I found that it is not supported in new Elasticsearch versions 

"dynamic_templates":[
                {
                    "categories_value":{
                        "match":"category_value_*",
                        "match_mapping_type":"string",
                        "mapping":{
                            "type":"integer"
                        }
                    }
                },
                {
                    "negative_keyword":{
                        "match":"negative_keyword_*",
                        "match_mapping_type":"string",
                        "mapping":{
                            "type":"integer"
                        }
                    }
                },
                {
                    "also_serving_area":{
                        "match":"also_serving_area_*",
                        "match_mapping_type":"string",
                        "mapping":{
                            "type":"integer"
                        }
                    }
                },
                {
                    "also_serving_city":{
                        "match":"also_serving_city_*",
                        "match_mapping_type":"string",
                        "mapping":{
                            "type":"integer"
                        }
                    }
                },
                {
                    "also_serving_directory":{
                        "match":"also_serving_directory_*",
                        "match_mapping_type":"string",
                        "mapping":{
                            "type":"integer"
                        }
                    }
                },
                {
                    "company_occasions":{
                        "match":"occasion_id_*",
                        "match_mapping_type":"string",
                        "mapping":{
                            "type":"integer"
                        }
                    }
                },
                {
                    "company_occasions_categories":{
                        "match":"occasion_category_*",
                        "match_mapping_type":"string",
                        "mapping":{
                            "type":"integer"
                        }
                    }
                }

            ]

so is there any other replacement to the groovy that I can Use in elasticSearch ?

Thanks

Comments

nico Date : 2022-02-26

Best answers

4

Best answers

4

Please try to upgrade to version 8.0, and the link explains how to use it.

https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic-templates.html

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

┘ĆElasticsearch mapping error
Publish date: 2022-03-06 | Comments: 0

Elasticsearch