Skip to content

Commit ff52090

Browse files
committed
BUGFIX: Mapping update work on the production indexes
1 parent dfb4dd3 commit ff52090

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Classes/Command/NodeIndexQueueCommandController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function buildCommand($workspace = null)
9191
{
9292
$indexPostfix = time();
9393
$indexName = $this->createNextIndex($indexPostfix);
94-
$this->updateMapping();
94+
$this->updateMapping($indexPostfix);
9595

9696
$this->outputLine();
9797
$this->outputLine('<b>Indexing on %s ...</b>', [$indexName]);
@@ -282,10 +282,11 @@ protected function createNextIndex($indexPostfix)
282282
* @return void
283283
* @throws \Flowpack\ElasticSearch\ContentRepositoryAdaptor\Exception
284284
*/
285-
protected function updateMapping()
285+
protected function updateMapping($indexPostfix)
286286
{
287287
$nodeTypeMappingCollection = $this->nodeTypeMappingBuilder->buildMappingInformation($this->nodeIndexer->getIndex());
288288
foreach ($nodeTypeMappingCollection as $mapping) {
289+
$this->nodeIndexer->setIndexNamePostfix($indexPostfix);
289290
/** @var Mapping $mapping */
290291
$mapping->apply();
291292
}

0 commit comments

Comments
 (0)