Skip to content

Commit

Permalink
TASK: Use legacy dimension value combinations from cr adpter package …
Browse files Browse the repository at this point in the history
…for compatibility
  • Loading branch information
mficzel committed Jul 2, 2021
1 parent 56d7fa1 commit 25f1c24
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions Classes/Command/GraphIndexNewCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,9 @@ public function buildCommand(int $limit = null, bool $update = false, string $wo
$this->nodeIndexer->setContentGraph($graph);
$this->outputLine('<success>Done</success> (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');
Expand Down Expand Up @@ -296,18 +290,18 @@ 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
* @throws Exception
* @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)]);

Expand Down

0 comments on commit 25f1c24

Please sign in to comment.