I've been playing with the catalogsearch for a while, and I'm almost done, but there is one odd thing happening to me. The only "usable in search" attributes are name
, child_skus
and synonyme
. In child_skus
, I'm storing the skus of the associated products of my grouped products, as I'm working with grouped products only on the frontend. synonyme
contains a list of coma-separated words which related to the said product.
What I'm using for the fulltext search is the following code :
$query = Mage::getModel('catalogsearch/query')->setQueryText($searchText)->prepare();
$fulltextResource = Mage::getResourceModel('catalogsearch/fulltext')->prepareResult(
Mage::getModel('catalogsearch/fulltext'),
$searchText,
$query
);
$products->getSelect()->joinInner(
array('search_result' => $products->getTable('catalogsearch/result')),
$products->getConnection()->quoteInto(
'search_result.product_id=e.entity_id AND search_result.query_id=?',
$query->getId()
),
array('relevance' => 'relevance')
);
$products->getSelect()->order('relevance DESC');
All works fine for now, except that somehow, it also indexes the associated product's name in the fulltext table, which ends up jamming my search because it yields biased results.
Does anyone have any idea on how to change that behaviour, or control it through admin?