From c2728b2a1df4fe092a50ac70db964169595e5e5e Mon Sep 17 00:00:00 2001 From: Rainer Killinger Date: Tue, 25 Feb 2020 16:57:12 +0100 Subject: [PATCH] refactor: move template/aggregation generation --- src/storage/elasticsearch/elasticsearch.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/storage/elasticsearch/elasticsearch.ts b/src/storage/elasticsearch/elasticsearch.ts index 1a951d5a..1c4294d1 100644 --- a/src/storage/elasticsearch/elasticsearch.ts +++ b/src/storage/elasticsearch/elasticsearch.ts @@ -205,6 +205,9 @@ export class Elasticsearch implements Database { this.aliasMap = {}; this.ready = false; + checkESTemplate(typeof process.env.ES_FORCE_MAPPING_UPDATE !== 'undefined' ? + process.env.ES_FORCE_MAPPING_UPDATE === 'true' : false); + this.aggregationsSchema = buildAggregations(); this.mailQueue = mailQueue; @@ -484,9 +487,6 @@ export class Elasticsearch implements Database { Monitoring.setUp(monitoringConfiguration, this.client, this.mailQueue); } - checkESTemplate(typeof process.env.ES_FORCE_MAPPING_UPDATE !== 'undefined' ? - process.env.ES_FORCE_MAPPING_UPDATE === 'true' : false); - return this.getAliasMap(); }