Skip to content

Commit 7411ece

Browse files
ComiRdfeyer
authored andcommitted
BUGFIX: Remove node from index before processing dimensions
1 parent 47ef49e commit 7411ece

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

  • Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer

Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer/NodeIndexer.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,11 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
213213
$dimensionCombinations = $this->contentDimensionCombinator->getAllAllowedCombinations();
214214
$workspaceName = $targetWorkspaceName ?: 'live';
215215
$nodeIdentifier = $node->getIdentifier();
216+
217+
if ($node->isRemoved()) {
218+
$indexer($node, $targetWorkspaceName);
219+
}
220+
216221
if ($dimensionCombinations !== []) {
217222
foreach ($dimensionCombinations as $combination) {
218223
$context = $this->contextFactory->create([
@@ -231,9 +236,6 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
231236
$indexer($node, $targetWorkspaceName);
232237
}
233238
}
234-
if ($node->isRemoved()) {
235-
$indexer($node, $targetWorkspaceName);
236-
}
237239
}
238240

239241
/**

0 commit comments

Comments
 (0)