Skip to content

Commit 25f1c24

Browse files
committed
TASK: Use legacy dimension value combinations from cr adpter package for compatibility
1 parent 56d7fa1 commit 25f1c24

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

Classes/Command/GraphIndexNewCommandController.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -249,15 +249,9 @@ public function buildCommand(int $limit = null, bool $update = false, string $wo
249249
$this->nodeIndexer->setContentGraph($graph);
250250
$this->outputLine('<success>Done</success> (took %s seconds)', [number_format(microtime(true) - $timeStart, 2)]);
251251

252-
$dimensionSpacePointSet = $this->contentDimensionZookeeper->getAllowedDimensionSubspace();
253-
$workspaceDimensionIdentifier = new ContentDimensionIdentifier('_workspace');
254-
foreach ($dimensionSpacePointSet as $dimensionSpacePoint) {
255-
if ($dimensionSpacePoint->getCoordinate($workspaceDimensionIdentifier) === 'live') {
256-
$coordinates = $dimensionSpacePoint->getCoordinates();
257-
unset($coordinates['_workspace']);
258-
$dimensionSpacepointWithoutWorkspace = new DimensionSpacePoint($coordinates);
259-
$this->buildIndexForDimensionSpacePoint($graph, $dimensionSpacepointWithoutWorkspace, $postfix, $limit);
260-
}
252+
$dimensionCombinations = new ArrayCollection($this->contentDimensionCombinator->getAllAllowedCombinations());
253+
foreach ($dimensionCombinations as $dimensionCombination) {
254+
$this->buildIndexForDimensionSpacePoint($graph, $dimensionCombination, $postfix, $limit);
261255
}
262256

263257
$runAndLog($refresh, 'Refresh indicies');
@@ -296,18 +290,18 @@ private function aliasesExist(): bool
296290
* Build up the node index
297291
*
298292
* @param ContentGraph $graph
299-
* @param DimensionSpacePoint $dimensionSpacePoint
293+
* @param array $dimensionValues
300294
* @param string|null $postfix
301295
* @param int|null $limit
302296
* @throws ConfigurationException
303297
* @throws Exception
304298
* @throws RuntimeException
305299
* @throws SubProcessException
306300
*/
307-
private function buildIndexForDimensionSpacePoint(ContentGraph $graph, DimensionSpacePoint $dimensionSpacePoint, string $postfix, $limit = null): void
301+
private function buildIndexForDimensionSpacePoint(ContentGraph $graph, array $dimensionValues, string $postfix, $limit = null): void
308302
{
309-
$dimensionsValues = $dimensionSpacePoint->getCoordinates();
310-
$dimensionsValues = $this->configureNodeIndexer($dimensionsValues, $postfix);
303+
$dimensionsValues = $this->configureNodeIndexer($dimensionValues, $postfix);
304+
$dimensionSpacePoint = DimensionSpacePoint::fromLegacyDimensionArray($dimensionsValues);
311305

312306
$this->output("Indexing dimension %s" . '... ' , [json_encode($dimensionsValues)]);
313307

0 commit comments

Comments
 (0)