diff --git a/vendor/magento/module-catalog-search/Model/Search/Request/PartialSearchModifier.php b/vendor/magento/module-catalog-search/Model/Search/Request/PartialSearchModifier.php index 5a543b363c99..c06144d6aab9 100644 --- a/vendor/magento/module-catalog-search/Model/Search/Request/PartialSearchModifier.php +++ b/vendor/magento/module-catalog-search/Model/Search/Request/PartialSearchModifier.php @@ -41,8 +41,12 @@ public function modify(array $requests): array if ($matches) { foreach ($matches as $index => $match) { $field = $match['field'] ?? null; - if ($field && $field !== '*' && !isset($attributes[$field])) { - unset($matches[$index]); + if ($field && $field !== '*') { + if (!isset($attributes[$field])) { + unset($matches[$index]); + continue; + } + $matches[$index]['boost'] = $attributes[$field]->getSearchWeight() ?: 1; } } $requests[$code]['queries']['partial_search']['match'] = array_values($matches);