Skip to content

Commit 0db2751

Browse files
authored
Merge pull request #26 from ttreeagency/dfeyer-patch-1
BUGFIX: Mapping update work on the production indexes
2 parents 625bbce + 6f55b1a commit 0db2751

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Classes/Flowpack/ElasticSearch/ContentRepositoryQueueIndexer/Command/NodeIndexQueueCommandController.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public function buildCommand($workspace = null)
8080
{
8181
$indexPostfix = time();
8282
$indexName = $this->createNextIndex($indexPostfix);
83-
$this->updateMapping();
83+
$this->updateMapping($indexPostfix);
8484

8585
$this->outputLine();
8686
$this->outputLine('<b>Indexing on %s ...</b>', [$indexName]);
@@ -255,10 +255,11 @@ protected function createNextIndex($indexPostfix)
255255
/**
256256
* Update Index Mapping
257257
*/
258-
protected function updateMapping()
258+
protected function updateMapping($indexPostfix)
259259
{
260260
$nodeTypeMappingCollection = $this->nodeTypeMappingBuilder->buildMappingInformation($this->nodeIndexer->getIndex());
261261
foreach ($nodeTypeMappingCollection as $mapping) {
262+
$this->nodeIndexer->setIndexNamePostfix($indexPostfix);
262263
/** @var Mapping $mapping */
263264
$mapping->apply();
264265
}

0 commit comments

Comments
 (0)