From de41faff805f91ff88e179b674f522c81c84cfa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Gaillard?= Date: Mon, 12 Aug 2013 15:16:45 +0200 Subject: [PATCH] [-] Core: Fix #PSCFV-8887 - improve performance of search indexation --- classes/Search.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/Search.php b/classes/Search.php index 32025f14b..df3a4f23f 100644 --- a/classes/Search.php +++ b/classes/Search.php @@ -478,7 +478,6 @@ class SearchCore // Those are kind of global variables required to save the processed data in the database every X occurrences, in order to avoid overloading MySQL $count_words = 0; $query_array3 = array(); - $products_array = array(); // Every indexed words are cached into a PHP array $word_ids = $db->executeS(' @@ -498,6 +497,7 @@ class SearchCore // Products are processed 50 by 50 in order to avoid overloading MySQL while (($products = Search::getProductsToIndex($total_languages, $id_product, 50)) && (count($products) > 0)) { + $products_array = array(); // Now each non-indexed product is processed one by one, langage by langage foreach ($products as $product) { @@ -702,4 +702,4 @@ class SearchCore return Product::getProductsProperties((int)$id_lang, $result); } -} +} \ No newline at end of file