@@ -135,6 +135,12 @@ class GraphIndexNewCommandController extends CommandController
135
135
*/
136
136
protected $ contentDimensionCombinator ;
137
137
138
+ /**
139
+ * @Flow\Inject
140
+ * @var DimensionsService
141
+ */
142
+ protected $ dimensionService ;
143
+
138
144
/**
139
145
* @Flow\Inject
140
146
* @var WorkspaceIndexer
@@ -249,15 +255,9 @@ public function buildCommand(int $limit = null, bool $update = false, string $wo
249
255
$ this ->nodeIndexer ->setContentGraph ($ graph );
250
256
$ this ->outputLine ('<success>Done</success> (took %s seconds) ' , [number_format (microtime (true ) - $ timeStart , 2 )]);
251
257
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
- }
258
+ $ dimensionCombinations = new ArrayCollection ($ this ->contentDimensionCombinator ->getAllAllowedCombinations ());
259
+ foreach ($ dimensionCombinations as $ dimensionCombination ) {
260
+ $ this ->buildIndexForDimensionSpacePoint ($ graph , $ dimensionCombination , $ postfix , $ limit );
261
261
}
262
262
263
263
$ runAndLog ($ refresh , 'Refresh indicies ' );
@@ -296,18 +296,19 @@ private function aliasesExist(): bool
296
296
* Build up the node index
297
297
*
298
298
* @param ContentGraph $graph
299
- * @param DimensionSpacePoint $dimensionSpacePoint
299
+ * @param array $dimensionValues
300
300
* @param string|null $postfix
301
301
* @param int|null $limit
302
302
* @throws ConfigurationException
303
303
* @throws Exception
304
304
* @throws RuntimeException
305
305
* @throws SubProcessException
306
306
*/
307
- private function buildIndexForDimensionSpacePoint (ContentGraph $ graph , DimensionSpacePoint $ dimensionSpacePoint , string $ postfix , $ limit = null ): void
307
+ private function buildIndexForDimensionSpacePoint (ContentGraph $ graph , array $ dimensionValues , string $ postfix , $ limit = null ): void
308
308
{
309
- $ dimensionsValues = $ dimensionSpacePoint ->getCoordinates ();
310
- $ dimensionsValues = $ this ->configureNodeIndexer ($ dimensionsValues , $ postfix );
309
+ $ dimensionsValues = $ this ->configureNodeIndexer ($ dimensionValues , $ postfix );
310
+ $ dimensionSpacePoint = DimensionSpacePoint::fromLegacyDimensionArray ($ dimensionsValues );
311
+ $ dimensionHash = $ this ->dimensionService ->hash ($ dimensionsValues );
311
312
312
313
$ this ->output ("Indexing dimension %s " . '... ' , [json_encode ($ dimensionsValues )]);
313
314
@@ -331,7 +332,7 @@ private function buildIndexForDimensionSpacePoint(ContentGraph $graph, Dimension
331
332
continue ;
332
333
}
333
334
334
- $ this ->nodeIndexer ->indexGraphNode ($ node , $ dimensionSpacePoint );
335
+ $ this ->nodeIndexer ->indexGraphNode ($ node , $ dimensionSpacePoint, $ dimensionHash );
335
336
$ indexedHierarchyRelations += count ($ node ->getIncomingHierarchyRelations ());
336
337
$ nodesSinceLastFlush ++;
337
338
$ nodesIndexed ++;
0 commit comments