/** * Indicates if an attribute is used into a search type. * * @param Mage_Eav_Model_Attribute $attribute Attribute we want the value for. * @param string $searchType Search type * * @return boolean */ protected function _isAttributeUsedForSearchType($attribute, $searchType) { $isSearchable = $attribute->getIsSearchable() || $attribute->getAttributeCode() == 'name'; if (in_array($searchType, array(self::SEARCH_TYPE_FUZZY, self::SEARCH_TYPE_PHONETIC))) { $isSearchable = $isSearchable && (bool) $attribute->getIsFuzzinessEnabled(); } else { if ($searchType == self::SEARCH_TYPE_AUTOCOMPLETE) { $isSearchable = $isSearchable && (bool) $attribute->getIsUsedInAutocomplete(); } } return $isSearchable; }