The protected variable $_pageSize of a Magento collection defaults to false. There is a note above this in \Magento\Framework\Data\Collection that reads "if page size is false, then we works with all items".
/**
* Pager page size
*
* if page size is false, then we works with all items
*
* @var int|false
*/
protected $_pageSize = false;
The smile class \Smile\ElasticsuiteCore\Search\Request\Builder::create does not work with pageSize = false appropriately in my opinion. (I just debugged for two days to find this).
If $size is false, it should behave more like Magento intended and return all results.
\Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection::prepareRequest also has a line of code that does not explicitly consider $size as false which would need to be addressed.
The protected variable $_pageSize of a Magento collection defaults to false. There is a note above this in
\Magento\Framework\Data\Collection
that reads "if page size is false, then we works with all items".The smile class
\Smile\ElasticsuiteCore\Search\Request\Builder::create
does not work with pageSize = false appropriately in my opinion. (I just debugged for two days to find this).If $size is false, it should behave more like Magento intended and return all results.
"All" results is sort of relative because ElasticSearch forces a limit and has a default limit of 10,000 for index.max_result_window (https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-from-size.html). This seems like a reasonable max for returning "all" records in Magento.
\Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection::prepareRequest
also has a line of code that does not explicitly consider $size as false which would need to be addressed.I have a fix for this and will submit it shortly.