]> git.aero2k.de Git - tmp/jakarta-migration.git/commitdiff
DRYD-853: Include instance id in ES index name.
authorRay Lee <ray.lee@lyrasis.org>
Thu, 23 Apr 2020 01:09:06 +0000 (21:09 -0400)
committerRay Lee <ray.lee@lyrasis.org>
Thu, 23 Apr 2020 01:09:06 +0000 (21:09 -0400)
services/common/src/main/java/org/collectionspace/services/common/ServiceMain.java

index 08466017174ee459904f8cfe79aa02cc0fac41b4..4c8af469421160d0170aadd32041e9856610037e 100644 (file)
@@ -1560,16 +1560,13 @@ public class ServiceMain {
         return repoConfigDoc;
     }
 
-    private String getElasticsearchIndexName(Document repoConfigDoc, String repositoryName,
-               String cspaceInstanceId) {
-       String result = ConfigUtils.DEFAULT_ELASTICSEARCH_INDEX_NAME;
-
-       if (repositoryName.equalsIgnoreCase(ConfigUtils.DEFAULT_NUXEO_REPOSITORY_NAME) == false) {
-               return repositoryName;
-       }
+       private String getElasticsearchIndexName(Document repoConfigDoc, String repositoryName, String cspaceInstanceId) {
+               String repo = repositoryName.equalsIgnoreCase(ConfigUtils.DEFAULT_NUXEO_REPOSITORY_NAME)
+                       ? ConfigUtils.DEFAULT_ELASTICSEARCH_INDEX_NAME
+                       : repositoryName;
 
-       return result;
-    }
+               return repo + cspaceInstanceId;
+       }
 
     /*
      * This method is filling out the elasticsearch-config.xml file with tenant specific repository information.