private function addIndexedAttribute(&$productIndexData, $attribute)
    {
        if (!isset($productIndexData['indexed_attributes'])) {
            $productIndexData['indexed_attributes'] = [];
        }

        // Data can be missing for this attribute (Eg : due to null value being escaped).
        if (isset($productIndexData[$attribute->getAttributeCode()])) {
            $productIndexData['indexed_attributes'][] = $attribute->getAttributeCode();
        }
    }
private function addIndexedAttribute(&$productIndexData, $attribute)
    {
        if (!isset($productIndexData['indexed_attributes'])) {
            $productIndexData['indexed_attributes'] = [];
        }

        // Data can be missing for this attribute (Eg : due to null value being escaped).
        if (isset($productIndexData[$attribute->getAttributeCode()])) {
            $productIndexData['indexed_attributes'][] = $attribute->getAttributeCode();
        }
    }
private function addIndexedAttribute ( & $ productIndexData , $ attribute ) { if ( ! isset ( $ productIndexData [ 'indexed_attributes' ] ) ) { $ productIndexData [ 'indexed_attributes' ] = [ ] ; } // Data can be missing for this attribute (Eg : due to null value being escaped). if ( isset ( $ productIndexData [ $ attribute -> getAttributeCode ( ) ] ) ) { $ productIndexData [ 'indexed_attributes' ] [ ] = $ attribute -> getAttributeCode ( ) ; } }
Append an indexed attributes to indexed data of a given product.

@param array                                                  $productIndexData Product Index data
@param \Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute        The attribute
Append an indexed attributes to indexed data of a given product .