Skip to content

Commit a461533

Browse files
committed
TASK: Remove superflous check for workspace
The updateFulltext method is called only when indexing should happen, and in the case of indexAllWorkspaces being true the behaviour should be consistent. The check thus was either useless or causing inconsistet behaviour.
1 parent 27a646c commit a461533

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

  • Classes/Flowpack/ElasticSearch/ContentRepositoryAdaptor/Indexer

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
252252
];
253253
}
254254

255-
$this->updateFulltext($node, $fulltextIndexOfNode, $targetWorkspaceName);
255+
$this->updateFulltext($node, $fulltextIndexOfNode);
256256
}
257257

258258
$this->logger->log(sprintf('NodeIndexer (%s): Added / updated node %s.', $documentIdentifier, $contextPath), LOG_DEBUG, null, 'ElasticSearch (CR)');
@@ -300,15 +300,10 @@ protected function calculateDocumentIdentifier(NodeInterface $node, $targetWorks
300300
*
301301
* @param NodeInterface $node
302302
* @param array $fulltextIndexOfNode
303-
* @param string $targetWorkspaceName
304303
* @return void
305304
*/
306-
protected function updateFulltext(NodeInterface $node, array $fulltextIndexOfNode, $targetWorkspaceName = null)
305+
protected function updateFulltext(NodeInterface $node, array $fulltextIndexOfNode)
307306
{
308-
if ((($targetWorkspaceName !== null && $targetWorkspaceName !== 'live') || $node->getWorkspace()->getName() !== 'live') || count($fulltextIndexOfNode) === 0) {
309-
return;
310-
}
311-
312307
$closestFulltextNode = $node;
313308
while (!$this->isFulltextRoot($closestFulltextNode)) {
314309
$closestFulltextNode = $closestFulltextNode->getParent();

0 commit comments

Comments
 (0)