Smile\ElasticsuiteCatalog\Model\Autocomplete\Product\Attribute\DataProvider::prepareProductCollection PHP Method

prepareProductCollection() private method

Append facets used to select suggested attributes.
private prepareProductCollection ( ) : DataProvider
return DataProvider
    private function prepareProductCollection()
    {
        foreach ($this->attributeCollection as $attribute) {
            $facetSize = $this->getResultsPageSize();
            $filterField = $this->getFilterField($attribute);
            $this->productCollection->addFacet($filterField, BucketInterface::TYPE_TERM, ['size' => $facetSize]);
        }
        return $this;
    }