You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by jk...@apache.org on 2021/07/02 13:11:28 UTC

[unomi] branch master updated: UNOMI-498: fix index template name to avoid conflict between multiple… (#320)

This is an automated email from the ASF dual-hosted git repository.

jkevan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/unomi.git


The following commit(s) were added to refs/heads/master by this push:
     new b837a04  UNOMI-498: fix index template name to avoid conflict between multiple… (#320)
b837a04 is described below

commit b837a0440f6c18cc24734ba68ba744370b61e953
Author: kevan Jahanshahi <ke...@jahia.com>
AuthorDate: Fri Jul 2 15:11:21 2021 +0200

    UNOMI-498: fix index template name to avoid conflict between multiple… (#320)
    
    * UNOMI-498: fix index template name to avoid conflict between multiple Unomi instances on the same ES server
    
    * remove unecessary file added accidently to the previous commit
---
 .../persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
index eac14c7..f2778c5 100644
--- a/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
+++ b/persistence-elasticsearch/core/src/main/java/org/apache/unomi/persistence/elasticsearch/ElasticSearchPersistenceServiceImpl.java
@@ -1232,7 +1232,7 @@ public class ElasticSearchPersistenceServiceImpl implements PersistenceService,
             protected Boolean execute(Object... args) throws IOException {
                 boolean executedSuccessfully = true;
                 for (String itemName : itemsMonthlyIndexed) {
-                    PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest("context-" + itemName + "-date-template")
+                    PutIndexTemplateRequest putIndexTemplateRequest = new PutIndexTemplateRequest(indexPrefix + "-" + itemName + "-date-template")
                             .patterns(Collections.singletonList(getMonthlyIndexForQuery(itemName)))
                             .order(1)
                             .settings("{\n" +