Skip to content

Commit

Permalink
Merged branch '6.13'
Browse files Browse the repository at this point in the history
  • Loading branch information
alongosz committed Feb 20, 2020
2 parents 58b8730 + 9be9163 commit 4738799
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eZ/Publish/Core/Search/Common/IncrementalIndexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ final public function createSearchIndex(OutputInterface $output, $iterationCount
* - not published (draft or trashed)
* Then item is removed from index, if not it is added/updated.
*
* If generic unhandled exception is thrown, then item indexing is skipped and warning is logged.
*
* @param int[] $contentIds
* @param bool $commit
*/
Expand Down
7 changes: 7 additions & 0 deletions eZ/Publish/Core/Search/Legacy/Content/Indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/
namespace eZ\Publish\Core\Search\Legacy\Content;

use Exception;
use eZ\Publish\API\Repository\Exceptions\NotFoundException;
use eZ\Publish\Core\Persistence\Database\DatabaseHandler;
use eZ\Publish\Core\Search\Common\IncrementalIndexer;
Expand Down Expand Up @@ -46,6 +47,12 @@ public function updateSearchIndex(array $contentIds, $commit)
}
} catch (NotFoundException $e) {
$this->searchHandler->deleteContent($contentId);
} catch (Exception $e) {
$context = [
'contentId' => $contentId,
'error' => $e->getMessage(),
];
$this->logger->error('Unable to index the content', $context);
}
}
}
Expand Down

0 comments on commit 4738799

Please sign in to comment.