Periodically we help local Brunswick / Medina Ohio companies with their websites, even if they are not on our system.  On this latest project our client was using a eCommerce platform called Magento.  On Magento, it seemed that no matter what you searched for it would return all the results.  This is a problem on many sites because it is a fundamental feature and needs to work on Magento (versions 1.4, 1.5, and 1.6).

The Cause

Apparently when the layered navigation block is not enabled, Magento seems to generate all products in every search result. Magento seems to generate all products in every search result

The Solution

With this knowledge a fix becomes very simple, so you have a few options depending on your situation.

People Who Dont Want Layered Navigation

In this particular case, the client did not want to have the layered navigation show up at all, but when we did so Magento returned all products no matter what the search terms.  So in order to remove it we used the following in our local.xml file:

<remove name="catalogsearch.leftnav" />

Because this caused Magento  to no matter what you searched for it would return all the results.  So what we did was to in the Magento Admin, we set: System / Configuration / Catalog / Catalog Search/ "Apply Layered Navigation if Search Results are Less Than" we set this to "1."  This hides the layered navigation, and keeps magento showing the proper results.

People Who Don't Want Any Columns

This becomes tricky, our solution to Magento returning all products no matter what the search terms in this case is to on your 1-column.phtml file is to display the left block, but place that inside of a hidden div

<div style="display:none"></div>.  

Feel free to post if you have questions or concerns about Magento seems to generating all products in every search result!