diff --git a/openmetadata-service/src/main/java/org/openmetadata/service/util/ElasticSearchIndexUtil.java b/openmetadata-service/src/main/java/org/openmetadata/service/util/ElasticSearchIndexUtil.java index 245260331f4..a6c9e225e8e 100644 --- a/openmetadata-service/src/main/java/org/openmetadata/service/util/ElasticSearchIndexUtil.java +++ b/openmetadata-service/src/main/java/org/openmetadata/service/util/ElasticSearchIndexUtil.java @@ -246,7 +246,11 @@ public class ElasticSearchIndexUtil { // Delete index elasticSearchIndexDefinition.deleteIndex(indexType); // Create index - elasticSearchIndexDefinition.createIndex(indexType, lang); + String language = + createRequest.getSearchIndexMappingLanguage() == null + ? lang + : createRequest.getSearchIndexMappingLanguage().value(); + elasticSearchIndexDefinition.createIndex(indexType, language); } // Start fetching a list of Report Data and pushing them to ES diff --git a/openmetadata-spec/src/main/resources/json/schema/api/createEventPublisherJob.json b/openmetadata-spec/src/main/resources/json/schema/api/createEventPublisherJob.json index 37496e235b2..aa0dfbe36a7 100644 --- a/openmetadata-spec/src/main/resources/json/schema/api/createEventPublisherJob.json +++ b/openmetadata-spec/src/main/resources/json/schema/api/createEventPublisherJob.json @@ -35,6 +35,10 @@ "description": "Maximum time to wait before sending request to ES in seconds(Default 30)", "type": "integer", "default": 30 + }, + "searchIndexMappingLanguage": { + "description": "Recreate Indexes with updated Language", + "$ref": "../configuration/elasticSearchConfiguration.json#/definitions/searchIndexMappingLanguage" } }, "required": ["publisherType", "runMode"],