From 576d69915ceba6def22f31773f5098e0c342571f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20W=C3=B3js?= Date: Tue, 8 Aug 2023 14:46:45 +0200 Subject: [PATCH] IBX-152: Optimized Legacy Search Engine FullText Word Indexer For more details see https://issues.ibexa.co/browse/IBX-152 and https://github.com/ezsystems/ezplatform-kernel/pull/176 --- .../Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eZ/Publish/Core/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php b/eZ/Publish/Core/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php index 938e16e69f..2889c281f6 100644 --- a/eZ/Publish/Core/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php +++ b/eZ/Publish/Core/Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php @@ -98,6 +98,7 @@ public function index(FullTextData $fullTextData) $wordCount = 0; $placement = 0; + $this->connection->beginTransaction(); // Remove previously indexed content if exists to avoid keeping in index removed field values $this->remove($fullTextData->id); foreach ($fullTextData->values as $fullTextValue) { @@ -156,7 +157,6 @@ public function index(FullTextData $fullTextData) } $wordIDArray = $this->buildWordIDArray(array_keys($indexArrayOnlyWords)); - $this->connection->beginTransaction(); for ($arrayCount = 0; $arrayCount < $wordCount; $arrayCount += 1000) { $placement = $this->indexWords( $fullTextData,