private function canIndexAttribute(AttributeInterface $attribute)
    {
        // 'price' attribute is declared as nested field into the indices file.
        $canIndex = $attribute->getBackendType() != 'static' && $attribute->getAttributeCode() !== 'price';

        if ($canIndex && $attribute->getBackendModel()) {
            foreach ($this->indexedBackendModels as $indexedBackendModel) {
                $canIndex = is_a($attribute->getBackendModel(), $indexedBackendModel, true);
                if ($canIndex) {
                    return $canIndex;
                }
            }
        }

        return $canIndex;
    }
private function canIndexAttribute(AttributeInterface $attribute)
    {
        // 'price' attribute is declared as nested field into the indices file.
        $canIndex = $attribute->getBackendType() != 'static' && $attribute->getAttributeCode() !== 'price';

        if ($canIndex && $attribute->getBackendModel()) {
            foreach ($this->indexedBackendModels as $indexedBackendModel) {
                $canIndex = is_a($attribute->getBackendModel(), $indexedBackendModel, true);
                if ($canIndex) {
                    return $canIndex;
                }
            }
        }

        return $canIndex;
    }
private function canIndexAttribute ( AttributeInterface $ attribute ) { // 'price' attribute is declared as nested field into the indices file. $ canIndex = $ attribute -> getBackendType ( ) != 'static' && $ attribute -> getAttributeCode ( ) !== 'price' ; if ( $ canIndex && $ attribute -> getBackendModel ( ) ) { foreach ( $ this -> indexedBackendModels as $ indexedBackendModel ) { $ canIndex = is_a ( $ attribute -> getBackendModel ( ) , $ indexedBackendModel , true ) ; if ( $ canIndex ) { return $ canIndex ; } } } return $ canIndex ; }
Check if an attribute can be indexed.

@param AttributeInterface $attribute Entity attribute.

@return boolean
Check if an attribute can be indexed .