diff --git a/Classes/Flowpack/ElasticSearch/ContentRepositoryQueueIndexer/Command/NodeIndexQueueCommandController.php b/Classes/Flowpack/ElasticSearch/ContentRepositoryQueueIndexer/Command/NodeIndexQueueCommandController.php index 5a135b8..b7f65a4 100644 --- a/Classes/Flowpack/ElasticSearch/ContentRepositoryQueueIndexer/Command/NodeIndexQueueCommandController.php +++ b/Classes/Flowpack/ElasticSearch/ContentRepositoryQueueIndexer/Command/NodeIndexQueueCommandController.php @@ -80,7 +80,7 @@ public function buildCommand($workspace = null) { $indexPostfix = time(); $indexName = $this->createNextIndex($indexPostfix); - $this->updateMapping(); + $this->updateMapping($indexPostfix); $this->outputLine(); $this->outputLine('Indexing on %s ...', [$indexName]); @@ -255,10 +255,11 @@ protected function createNextIndex($indexPostfix) /** * Update Index Mapping */ - protected function updateMapping() + protected function updateMapping($indexPostfix) { $nodeTypeMappingCollection = $this->nodeTypeMappingBuilder->buildMappingInformation($this->nodeIndexer->getIndex()); foreach ($nodeTypeMappingCollection as $mapping) { + $this->nodeIndexer->setIndexNamePostfix($indexPostfix); /** @var Mapping $mapping */ $mapping->apply(); }