Skip to content

Commit 6439909

Browse files
committed
MERGE: Merge branch 'master' into fix-error-handling
2 parents 184e82f + c71859e commit 6439909

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

Classes/Driver/AbstractIndexerDriver.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver;
43

54
/*
@@ -49,7 +48,7 @@ protected function findClosestFulltextRoot(NodeInterface $node)
4948
if ($closestFulltextNode === null) {
5049
// root of hierarchy, no fulltext root found anymore, abort silently...
5150
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)');
51+
$this->logger->log(sprintf('NodeIndexer: No fulltext root found for node %s (%s)', $node->getContextPath(), $node->getIdentifier()), LOG_WARNING, null, 'ElasticSearch (CR)');
5352
}
5453

5554
return null;

Classes/Driver/Version1/IndexerDriver.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version1;
43

54
/*

Classes/Driver/Version2/IndexerDriver.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<?php
2-
32
namespace Flowpack\ElasticSearch\ContentRepositoryAdaptor\Driver\Version2;
43

54
/*
@@ -93,7 +92,7 @@ public function fulltext(NodeInterface $node, array $fulltextIndexOfNode, $targe
9392

9493
if ($closestFulltextNode->isRemoved()) {
9594
// fulltext root is removed, abort silently...
96-
$this->logger->log(sprintf('NodeIndexer (%s): Fulltext root found for %s (%s) not updated, it is removed', $closestFulltextNodeDocumentIdentifier, $node->getPath(), $node->getIdentifier()), LOG_DEBUG, null, 'ElasticSearch (CR)');
95+
$this->logger->log(sprintf('NodeIndexer (%s): Fulltext root found for %s (%s) not updated, it is removed', $closestFulltextNodeDocumentIdentifier, $node->getContextPath(), $node->getIdentifier()), LOG_DEBUG, null, 'ElasticSearch (CR)');
9796

9897
return null;
9998
}

Classes/Indexer/NodeIndexer.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ class NodeIndexer extends AbstractNodeIndexer implements BulkNodeIndexerInterfac
125125
* Returns the index name to be used for indexing, with optional indexNamePostfix appended.
126126
*
127127
* @return string
128+
* @throws Exception
128129
*/
129130
public function getIndexName()
130131
{
@@ -151,6 +152,7 @@ public function setIndexNamePostfix($indexNamePostfix)
151152
* Return the currently active index to be used for indexing
152153
*
153154
* @return Index
155+
* @throws Exception
154156
*/
155157
public function getIndex()
156158
{
@@ -166,7 +168,6 @@ public function getIndex()
166168
* @param NodeInterface $node
167169
* @param string $targetWorkspaceName In case indexing is triggered during publishing, a target workspace name will be passed in
168170
* @return void
169-
* @throws \Neos\ContentRepository\Search\Exception\IndexingException
170171
*/
171172
public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
172173
{
@@ -240,7 +241,7 @@ public function indexNode(NodeInterface $node, $targetWorkspaceName = null)
240241
$this->removeNode($node, $context->getWorkspaceName());
241242
$this->logger->log(sprintf('NodeIndexer (%s): Removed node with identifier %s, no longer in workspace %s', $documentIdentifier, $node->getIdentifier(), $context->getWorkspaceName()), LOG_DEBUG, null, 'ElasticSearch (CR)');
242243
} else {
243-
$this->logger->log(sprintf('NodeIndexer (%s): Could not index node with identifier %s, not found in workspace %s', $documentIdentifier, $node->getIdentifier(), $context->getWorkspaceName()), LOG_DEBUG, null, 'ElasticSearch (CR)');
244+
$this->logger->log(sprintf('NodeIndexer (%s): Could not index node with identifier %s, not found in workspace %s with dimensions %s', $documentIdentifier, $node->getIdentifier(), $context->getWorkspaceName(), json_encode($context->getDimensions())), LOG_DEBUG, null, 'ElasticSearch (CR)');
244245
}
245246
}
246247
};
@@ -310,6 +311,7 @@ public function removeNode(NodeInterface $node, $targetWorkspaceName = null)
310311
* Perform the current bulk request
311312
*
312313
* @return void
314+
* @throws Exception
313315
*/
314316
public function flush()
315317
{
@@ -354,7 +356,6 @@ public function flush()
354356
* @return void
355357
* @throws Exception
356358
* @throws ApiException
357-
* @throws \Exception
358359
*/
359360
public function updateIndexAlias()
360361
{
@@ -406,6 +407,7 @@ public function updateIndexAlias()
406407
* making the "old" index a stale one).
407408
*
408409
* @return array<string> a list of index names which were removed
410+
* @throws Exception
409411
*/
410412
public function removeOldIndices()
411413
{

0 commit comments

Comments
 (0)