Skip to content

Commit 184e82f

Browse files
committed
TASK: Skip "error" message during index build
When / and /sites are to be indexed, it is rather unsurprising to not find a fulltext root. Thus this changes skips these messages: NodeIndexer: No fulltext root found for node / (...) NodeIndexer: No fulltext root found for node /sites (0...) for the root and sites node.
1 parent 0ad5e13 commit 184e82f

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Classes/Driver/AbstractIndexerDriver.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,9 @@ protected function findClosestFulltextRoot(NodeInterface $node)
4848
$closestFulltextNode = $closestFulltextNode->getParent();
4949
if ($closestFulltextNode === null) {
5050
// root of hierarchy, no fulltext root found anymore, abort silently...
51-
$this->logger->log(sprintf('NodeIndexer: No fulltext root found for node %s (%s)', $node->getPath(), $node->getIdentifier()), LOG_WARNING, null, 'ElasticSearch (CR)');
51+
if ($node->getPath() !== '/' && $node->getPath() !== '/sites') {
52+
$this->logger->log(sprintf('NodeIndexer: No fulltext root found for node %s (%s)', $node->getPath(), $node->getIdentifier()), LOG_WARNING, null, 'ElasticSearch (CR)');
53+
}
5254

5355
return null;
5456
}

0 commit comments

Comments
 (0)