diff -Nuar a/vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php b/vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php index bd19485f5aa..d56f81c99e0 100644 --- a/vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php +++ b/vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php @@ -396,6 +396,7 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Product\Collection /** This variable sets by serOrder method, but doesn't have a getter method. */ 'orders' => $this->_orders, 'size' => $this->getPageSize(), + 'currentPage' => (int)$this->_curPage, ] ); } diff -Nuar a/vendor/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php b/vendor/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php index acbd05f31a9..05a238d69f3 100644 --- a/vendor/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php +++ b/vendor/magento/module-elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchResultApplier.php @@ -69,6 +69,7 @@ class SearchResultApplier implements SearchResultApplierInterface foreach ($items as $item) { $ids[] = (int)$item->getId(); } + $this->collection->setPageSize(null); $this->collection->getSelect()->where('e.entity_id IN (?)', $ids); $orderList = join(',', $ids); $this->collection->getSelect()->reset(\Magento\Framework\DB\Select::ORDER);