diff --git a/vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php b/vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php
index 6005455a6ef..15ebfca0917 100644
--- a/vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php
+++ b/vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php
@@ -189,10 +189,8 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
         Advanced $advancedSearchResource = null
     ) {
         $this->searchRequestName = $searchRequestName;
-        if ($searchResultFactory === null) {
-            $this->searchResultFactory = \Magento\Framework\App\ObjectManager::getInstance()
-                ->get(\Magento\Framework\Api\Search\SearchResultFactory::class);
-        }
+        $this->searchResultFactory = $searchResultFactory ?: ObjectManager::getInstance()
+            ->get(SearchResultFactory::class);
         $this->searchCriteriaResolverFactory = $searchCriteriaResolverFactory ?: ObjectManager::getInstance()
             ->get(SearchCriteriaResolverFactory::class);
         $this->searchResultApplierFactory = $searchResultApplierFactory ?: ObjectManager::getInstance()
@@ -241,7 +239,7 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection
     public function addFieldsToFilter($fields)
     {
         if ($fields) {
-            $this->filters = array_merge($this->filters, $fields);
+            $this->filters = array_replace_recursive($this->filters, $fields);
         }
         return $this;
     }
