Add Indexing Mapping Language in Reindexing (#10537)

This commit is contained in:
Mohit Yadav 2023-03-14 10:28:56 +05:30 committed by GitHub
parent 801f53bad1
commit 26efcb1197
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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"],