/** * Check attributes has options and searchable * * @param \Magento\Catalog\Model\Entity\Attribute $attribute * @return boolean */ protected function _hasAttributeOptionsAndSearchable($attribute) { if ($attribute->getIsSearchable() && in_array($attribute->getFrontendInput(), ['select', 'multiselect'])) { return true; } return false; }