Просмотр исходного кода

- move back !this.isElasticsearchReindexOnBoot inside this.isConfigured condition

LuqmanHakim-Grune 4 лет назад
Родитель
Сommit
1d21041f0d
1 измененных файлов с 8 добавлено и 9 удалено
  1. 8 9
      packages/app/src/server/service/search.ts

+ 8 - 9
packages/app/src/server/service/search.ts

@@ -80,15 +80,14 @@ class SearchService implements SearchQueryParser, SearchResolver {
     if (this.isConfigured) {
       this.fullTextSearchDelegator.init();
       this.registerUpdateEvent();
-    }
-
-    if (!this.isElasticsearchReindexOnBoot) {
-      logger.info('ELASTICSEARCH_REINDEX_ON_BOOT value is false, no reindex on boot');
-      this.normalizeIndices();
-    }
-    else {
-      logger.info('Reindex elasticsearch is running');
-      this.rebuildIndex(); // rebuildIndex() will call normalizeIndices() in the end of rebuildIndex() process
+      if (!this.isElasticsearchReindexOnBoot) {
+        logger.info('ELASTICSEARCH_REINDEX_ON_BOOT value is false, no reindex on boot');
+        this.normalizeIndices();
+      }
+      else {
+        logger.info('Reindex elasticsearch is running');
+        this.rebuildIndex(); // rebuildIndex() will call normalizeIndices() in the end of rebuildIndex() process
+      }
     }
   }