From d7cdd7bf6f397119c83814d412ed02f8702cb7fb Mon Sep 17 00:00:00 2001 From: Lukasz Bajsarowicz Date: Tue, 25 Feb 2020 14:06:44 +0100 Subject: [PATCH] I have no idea why it should work --- .../Fulltext/Collection/SearchCriteriaResolver.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchCriteriaResolver.php b/app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchCriteriaResolver.php index 4519bfbe18530..64ce76c729334 100644 --- a/app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchCriteriaResolver.php +++ b/app/code/Magento/Elasticsearch/Model/ResourceModel/Fulltext/Collection/SearchCriteriaResolver.php @@ -80,7 +80,9 @@ public function resolve(): SearchCriteria $searchCriteria->setRequestName($this->searchRequestName); $searchCriteria->setSortOrders($this->orders); $searchCriteria->setCurrentPage($this->currentPage - 1); - $searchCriteria->setPageSize($this->size); + if ($this->size) { + $searchCriteria->setPageSize($this->size); + } return $searchCriteria; }