[-] Core: Fix #PSCFV-8887 - improve performance of search indexation
This commit is contained in:
1 parent
bae9df61dc
commit
de41faff80
1 file changed
+2
-2
+2
-2
@@ -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
|
// 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;
|
$count_words = 0;
|
||||||
$query_array3 = array();
|
$query_array3 = array();
|
||||||
$products_array = array();
|
|
||||||
|
|
||||||
// Every indexed words are cached into a PHP array
|
// Every indexed words are cached into a PHP array
|
||||||
$word_ids = $db->executeS('
|
$word_ids = $db->executeS('
|
||||||
@@ -498,6 +497,7 @@ class SearchCore
|
|||||||
// Products are processed 50 by 50 in order to avoid overloading MySQL
|
// Products are processed 50 by 50 in order to avoid overloading MySQL
|
||||||
while (($products = Search::getProductsToIndex($total_languages, $id_product, 50)) && (count($products) > 0))
|
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
|
// Now each non-indexed product is processed one by one, langage by langage
|
||||||
foreach ($products as $product)
|
foreach ($products as $product)
|
||||||
{
|
{
|
||||||
@@ -702,4 +702,4 @@ class SearchCore
|
|||||||
|
|
||||||
return Product::getProductsProperties((int)$id_lang, $result);
|
return Product::getProductsProperties((int)$id_lang, $result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user