Some of the products weren't showing up in the search results on a site that I've been working on.
After looking at it for a while and logging the sql queries I've found that it's only searching the default category (category_id = 2). The first query is:
SELECT `s`.`product_id`, 0 AS `relevance` FROM `catalogsearch_fulltext` AS `s` INNER JOIN `catalog_product_entity` AS `e` ON e.entity_id = s.product_id WHERE (s.store_id = 1) AND ((`s`.`data_index` LIKE '%denim%'))
which has 26 results, the next query is:
SELECT COUNT(DISTINCT e.entity_id) FROM `catalog_product_entity` AS `e` INNER JOIN `catalog_product_index_price` AS `price_index` ON price_index.entity_id = e.entity_id AND price_index.website_id = '1' AND price_index.customer_group_id = 0 INNER JOIN `catalog_category_product_index` AS `cat_index` ON cat_index.product_id=e.entity_id AND cat_index.store_id='1' AND cat_index.visibility IN(3, 4) AND cat_index.category_id = '2' WHERE (`e`.`entity_id` IN(<the previous product_ids>))
since the products aren't in the default category they aren't showing up. My question is how to change this so it searches all queries.