You can achieve this by implementing custom extension. I have implement some kind of custom search methods that may help you in some way.
It will work directly with Magento product table search not with full text.
Hope it helps.
public function search($searchedQuery, $storeId = null)
{
if (is_null($storeId)) {
$storeId = Mage::app()->getStore()->getId();
}
if (is_null($searchedQuery) || is_null($storeId)) {
return null;
}
$productCollection = null;
$searchableAttributes = explode(',', $this->searchableAttributes() );
$productIds = array();
foreach ($searchableAttributes as $attributeId) {
$productIds = array_merge($productIds, $this->searchProducts($storeId));
}
if (!count($productIds)) {
return null;
}
$productCollection = $this->_prepareCollection();
$productCollection
->addFilterByIds($productIds)
->addStoreFilter($storeId)
->addAttributeToFilter('status', Mage_Catalog_Model_Product_Status::STATUS_ENABLED)
->setVisibility(array(
Mage_Catalog_Model_Product_Visibility::VISIBILITY_IN_SEARCH,
Mage_Catalog_Model_Product_Visibility::VISIBILITY_BOTH
))
;
if (is_null($productCollection)) {
return null;
}
$productCollection = $this->_postProcessCollection($productCollection);
$productCollection->setOrder('name', Varien_Data_Collection::SORT_ORDER_ASC);
$productCollection->setPageSize(10);
return $productCollection;
}
public function getSearchedQuery()
{
$q = Mage::app()->getRequest()->getParam('q');
if (is_null($q)) {
$q = '';
}
return htmlspecialchars_decode(Mage::helper('core')->escapeHtml($q));
}
public function getSearchedWords()
{
$q = $this->getSearchedQuery();
$searchedWords = explode(' ', trim($q));
for ($i = 0; $i < count($searchedWords); $i++) {
if (strlen($searchedWords[$i]) < 2 || preg_match('(:)', $searchedWords[$i])) {
unset($searchedWords[$i]);
}
}
return $searchedWords;
}
protected function searchableAttributes() {
return 'sku,name,description,short_description,meta_title';
}
protected function _getSearchableAttributesTypes()
{
$attributes = array();
$searchableAttributes = explode(',', $this->searchableAttributes() );
if (count($searchableAttributes) !== 0) {
foreach ($searchableAttributes as $attributeId) {
$attribute = Mage::getModel('eav/entity_attribute')->load($attributeId);
if ($attribute->getId()) {
$attributes[$attributeId] = $attribute->getBackendType();
}
}
}
return $attributes;
}
public function searchProducts($storeId)
{
$ids = array();
$resource = Mage::getSingleton('core/resource');
$db = $resource->getConnection('core_read');
$searchedWords = $this->getSearchedWords();
$attributes = $this->_getSearchableAttributesTypes();
if (count($attributes) == 0) {
return $ids;
}
//tbl= entity_type_collection with where entity_type_code = catalog_product
$entityTypeId = 4;
foreach ($attributes as $tableName) {
if ($tableName != 'static') {
$select = $db->select();
if ($tableName == 'int') {
$eaov = $resource->getTableName('eav/attribute_option_value');
$cpei = $resource->getTableName('catalog/product') . '_' . $tableName;
$select->from(array('cpei' => $cpei), array('cpei.entity_id'))
->join(array('eaov' => $eaov), 'cpei.`value` = eaov.option_id', array())
->where('cpei.entity_type_id=?', $entityTypeId)
->where('cpei.store_id=0 OR cpei.store_id=?', $storeId)
->where('cpei.attribute_id IN (' . implode(',', array_keys($attributes)) . ')');
foreach ($searchedWords as $value) {
$select ->where('eaov.`value` LIKE "%' . addslashes($value) . '%"');
}
} else {
$select
->distinct()
->from($resource->getTableName('catalog/product') . '_' . $tableName, 'entity_id')
->where('entity_type_id=?', $entityTypeId )
->where('store_id=0 OR store_id=?', $storeId)
->where('attribute_id IN (' . implode(',', array_keys($attributes)) . ')');
foreach ($searchedWords as $value) {
$select->where('`value` LIKE "%' . addslashes($value) . '%"');
}
}
$ids = array_merge($ids, $db->fetchCol($select));
}
if ($tableName == 'static') {
$select = $db->select();
$select->distinct()
->from($resource->getTableName('catalog/product'), 'entity_id')
->where('entity_type_id=?', $entityTypeId);
foreach ($searchedWords as $value) {
$select->where('`sku` LIKE "%' . addslashes($value) . '%"');
}
$ids = array_merge($ids, $db->fetchCol($select));
}
}
return array_unique($ids);
}