Procházet zdrojové kódy

- Adjust rebuildIndex conditions

LuqmanHakim-Grune před 4 roky
rodič
revize
0f52d5c9ef
1 změnil soubory, kde provedl 2 přidání a 6 odebrání
  1. 2 6
      packages/app/src/server/service/search.ts

+ 2 - 6
packages/app/src/server/service/search.ts

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