Smile\ElasticsuiteCatalog\Model\Product\Indexer\Fulltext\Datasource\AttributeData::addAttributeData PHP Method

addAttributeData() private method

Append attribute data to the index.
private addAttributeData ( integer $storeId, array $productIds, array $indexData = [] ) : array
$storeId integer Indexed store id.
$productIds array Indexed product ids.
$indexData array Original indexed data.
return array
    private function addAttributeData($storeId, $productIds, $indexData = [])
    {
        foreach ($this->attributeIdsByTable as $backendTable => $attributeIds) {
            $attributesData = $this->loadAttributesRawData($storeId, $productIds, $backendTable, $attributeIds);
            foreach ($attributesData as $row) {
                $productId = (int) $row['entity_id'];
                $attribute = $this->attributesById[$row['attribute_id']];
                $indexValues = $this->attributeHelper->prepareIndexValue($attribute, $storeId, $row['value']);
                if (!isset($indexData[$productId])) {
                    $indexData[$productId] = [];
                }
                $indexData[$productId] += $indexValues;
            }
        }
        return $indexData;
    }