Skip to content

Commit 8996374

Browse files
Merge pull request #360 from daniellienert/task/remove-inner-dimensions-loop
TASK: Remove contentDimensionCombination loop in nodeIndexer
2 parents b4413ec + db5664e commit 8996374

1 file changed

Lines changed: 1 addition & 16 deletions

File tree

Classes/Indexer/NodeIndexer.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
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;
3534
use Neos\ContentRepository\Domain\Service\Context;
3635
use Neos\ContentRepository\Domain\Service\ContextFactory;
3736
use Neos\ContentRepository\Search\Indexer\AbstractNodeIndexer;
@@ -82,12 +81,6 @@ class NodeIndexer extends AbstractNodeIndexer implements BulkNodeIndexerInterfac
8281
*/
8382
protected $logger;
8483

85-
/**
86-
* @Flow\Inject
87-
* @var ContentDimensionCombinator
88-
*/
89-
protected $contentDimensionCombinator;
90-
9184
/**
9285
* @Flow\Inject
9386
* @var ContextFactory
@@ -295,15 +288,7 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null): voi
295288
};
296289

297290
$workspaceName = $targetWorkspaceName ?: $node->getContext()->getWorkspaceName();
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-
}
291+
$handleNode($node, $this->createContentContext($workspaceName, $node->getDimensions()));
307292
}
308293

309294
/**

0 commit comments

Comments
 (0)