Advance search results pagination not working on Elasticsearch

Issue: All search results products shown in stead of 12/24/36 and pagination not useful working.

Solution for 2.3.5, edit:

vendor/magento/module-catalog-search/Model/ResourceModel/Advanced/Collection.php

change function to

public function _loadEntities($printQuery = false, $logQuery = false)
{
$this->getEntity();
$currentSearchEngine = $this->_scopeConfig->getValue(self::SEARCH_ENGINE_VALUE_PATH); //var_dump($currentSearchEngine); if ($this->_pageSize && ($currentSearchEngine === EngineResolver::CATALOG_SEARCH_MYSQL_ENGINE || $currentSearchEngine == 'elastic')) { $this->getSelect()->limitPage($this->getCurPage(), $this->_pageSize); } $this->printLogQuery($printQuery, $logQuery);