Search does not return results

Open your file Mage_CatalogSearch_Model_Layer and in method

public function prepareProductCollection($collection)

before return $this;

Add following rows:

Mage::log($collection->getSelectSQL(1), false, 'search.log', true);
Mage::log((array)Mage::getConfig()->getNode()->global->models->catalogsearch, false, 'search.log', true)

(it's for debug purpose to understand your problem).

Then open your var/log/search.log and put result to your first post (there should be long sql query and array where we can see rewrites).


I've experienced this. My fix was to go to Manage Products and select all products and perform an "Update Attributes" from the dropdown above the grid. In the Update Attributes screen, move to the Websites tab and re-associate with the proper website by checking the checkbox under Add Products To Website.

After this, another Search Index rebuild may be required.


go to

admin->attributs->manage attribute-> search sku - open it -> Frontend Properties-> Use in Quick Search (YES )

, Use in Advanced Search (YES). thats it.