/** * Check attribute is Text and is Searchable * * @param \Magento\Catalog\Model\Entity\Attribute $attribute * @return boolean */ protected function _isAttributeTextAndSearchable($attribute) { if ($attribute->getIsSearchable() && !in_array($attribute->getFrontendInput(), ['select', 'multiselect']) && (in_array($attribute->getBackendType(), ['varchar', 'text']) || $attribute->getBackendType() == 'static')) { return true; } return false; }