From 25f1c244412fb4dcf480131fb63368af5098cfcb Mon Sep 17 00:00:00 2001 From: Martin Ficzel Date: Fri, 2 Jul 2021 11:13:52 +0200 Subject: [PATCH] TASK: Use legacy dimension value combinations from cr adpter package for compatibility --- .../GraphIndexNewCommandController.php | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Classes/Command/GraphIndexNewCommandController.php b/Classes/Command/GraphIndexNewCommandController.php index 2ad8fdb..254d64a 100644 --- a/Classes/Command/GraphIndexNewCommandController.php +++ b/Classes/Command/GraphIndexNewCommandController.php @@ -249,15 +249,9 @@ public function buildCommand(int $limit = null, bool $update = false, string $wo $this->nodeIndexer->setContentGraph($graph); $this->outputLine('Done (took %s seconds)', [number_format(microtime(true) - $timeStart, 2)]); - $dimensionSpacePointSet = $this->contentDimensionZookeeper->getAllowedDimensionSubspace(); - $workspaceDimensionIdentifier = new ContentDimensionIdentifier('_workspace'); - foreach ($dimensionSpacePointSet as $dimensionSpacePoint) { - if ($dimensionSpacePoint->getCoordinate($workspaceDimensionIdentifier) === 'live') { - $coordinates = $dimensionSpacePoint->getCoordinates(); - unset($coordinates['_workspace']); - $dimensionSpacepointWithoutWorkspace = new DimensionSpacePoint($coordinates); - $this->buildIndexForDimensionSpacePoint($graph, $dimensionSpacepointWithoutWorkspace, $postfix, $limit); - } + $dimensionCombinations = new ArrayCollection($this->contentDimensionCombinator->getAllAllowedCombinations()); + foreach ($dimensionCombinations as $dimensionCombination) { + $this->buildIndexForDimensionSpacePoint($graph, $dimensionCombination, $postfix, $limit); } $runAndLog($refresh, 'Refresh indicies'); @@ -296,7 +290,7 @@ private function aliasesExist(): bool * Build up the node index * * @param ContentGraph $graph - * @param DimensionSpacePoint $dimensionSpacePoint + * @param array $dimensionValues * @param string|null $postfix * @param int|null $limit * @throws ConfigurationException @@ -304,10 +298,10 @@ private function aliasesExist(): bool * @throws RuntimeException * @throws SubProcessException */ - private function buildIndexForDimensionSpacePoint(ContentGraph $graph, DimensionSpacePoint $dimensionSpacePoint, string $postfix, $limit = null): void + private function buildIndexForDimensionSpacePoint(ContentGraph $graph, array $dimensionValues, string $postfix, $limit = null): void { - $dimensionsValues = $dimensionSpacePoint->getCoordinates(); - $dimensionsValues = $this->configureNodeIndexer($dimensionsValues, $postfix); + $dimensionsValues = $this->configureNodeIndexer($dimensionValues, $postfix); + $dimensionSpacePoint = DimensionSpacePoint::fromLegacyDimensionArray($dimensionsValues); $this->output("Indexing dimension %s" . '... ' , [json_encode($dimensionsValues)]);