Skip to content

Commit 9d26a03

Browse files
committed
Revert "TASK: Remove contentDimentsionCombination loop in nodeIndexer"
This reverts commit db5664e.
1 parent dd34d7a commit 9d26a03

1 file changed

Lines changed: 16 additions & 1 deletion

File tree

Classes/Indexer/NodeIndexer.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
use Flowpack\ElasticSearch\Domain\Model\Index;
3232
use Flowpack\ElasticSearch\Transfer\Exception\ApiException;
3333
use Neos\ContentRepository\Domain\Model\NodeInterface;
34+
use Neos\ContentRepository\Domain\Service\ContentDimensionCombinator;
3435
use Neos\ContentRepository\Domain\Service\Context;
3536
use Neos\ContentRepository\Domain\Service\ContextFactory;
3637
use Neos\ContentRepository\Search\Indexer\AbstractNodeIndexer;
@@ -81,6 +82,12 @@ class NodeIndexer extends AbstractNodeIndexer implements BulkNodeIndexerInterfac
8182
*/
8283
protected $logger;
8384

85+
/**
86+
* @Flow\Inject
87+
* @var ContentDimensionCombinator
88+
*/
89+
protected $contentDimensionCombinator;
90+
8491
/**
8592
* @Flow\Inject
8693
* @var ContextFactory
@@ -288,7 +295,15 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null): voi
288295
};
289296

290297
$workspaceName = $targetWorkspaceName ?: $node->getContext()->getWorkspaceName();
291-
$handleNode($node, $this->createContentContext($workspaceName, $node->getDimensions()));
298+
$dimensionCombinations = $this->contentDimensionCombinator->getAllAllowedCombinations();
299+
300+
if (array_filter($dimensionCombinations) === []) {
301+
$handleNode($node, $this->createContentContext($workspaceName));
302+
} else {
303+
foreach ($dimensionCombinations as $combination) {
304+
$handleNode($node, $this->createContentContext($workspaceName, $combination));
305+
}
306+
}
292307
}
293308

294309
/**

0 commit comments

Comments
 (0)