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;

                $this->addIndexedAttribute($indexData[$productId], $attribute);
            }
        }

        return $indexData;
    }
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;

                $this->addIndexedAttribute($indexData[$productId], $attribute);
            }
        }

        return $indexData;
    }
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 ; $ this -> addIndexedAttribute ( $ indexData [ $ productId ] , $ attribute ) ; } } return $ indexData ; }
Append attribute data to the index.

@param int   $storeId    Indexed store id.
@param array $productIds Indexed product ids.
@param array $indexData  Original indexed data.

@return array
Append attribute data to the index .