5

I am trying to figure out how Magento sorts products and how one can move a product up or down in the catalog search results.

How can this be done?

  • 1
    Ditch stock Magento search and look for a module that implements the Zend Lucene search, Sphinx, or implement Solr. Magento stock Lick search leaves a bad taste, as often does Fulltext. Yes, you will have to pay for a good module, but the ROI is pretty swift as is improved customer UX. Magento Like search returns results in product id order... – Fiasco Labs Jul 23 '15 at 23:51
  • "Lick search leaves a bad taste" - yeah, you should't have licked that – Fabian Schmengler Aug 24 '15 at 15:35
  • Heh, you caught that... Like searches have their function, as a site search, their abilities are far exceeded and leave one wishing for much better. I imagine the taste to be an Alum/Alkali water deeply repugnant foul thing that lingers for hours. You don't ever want to experience it and neither should your Magento customers. – Fiasco Labs Aug 24 '15 at 16:22
2

You cannot directly move results up and down with the default search mechanism in Magento CE. In "fulltext" and "combined" mode the search results are ordered by relevance with:

MATCH (data_index) AGAINST (:query IN BOOLEAN MODE)

In "like" mode, the search results are not ordered at all.

Hoever, in fulltext or combined mode, you can add artificial relevance for specific search terms using a hidden searchable attribute, as explained here: Manually specifying top search results for a specific search query

Some search extensions allow specifying a "boost" or "weight" value for attributes, in this case you can enter a very high value for certain attributes instead.

  • Thanks for suggesting this as a workaround. Unfortunately I don't see the keyword stuffing in a custom attribute as a clean solution to the problem. Isn't there a simple way (e.g. a simple extension) that would use a "weight" attribute in the sorting? I am using "Like" as search type. – george Aug 25 '15 at 17:27
1

It really surprises me the Catalog Search doesn't reflect the relevance of the default category... Might have something to do with the nature of the search. if you change the System > Config > Catalog > Catalog Search > Search Type to "Fulltext" & reindex, does it help?

If you have configurable products or bundled products, make sure the simple products associated to those are "not visible individually" otherwise you'll have a lot of unwanted search results.

  • Sorry, I don't understand how changing the search type will help in manipulating product position in the result. Could you explain? What I see when switching to Full text is a lot of irrelevant results actually. There are products listed which don't contain in their attributes some of the search words. – george May 5 '15 at 8:22
0

You do that in the product category catalog > categories > if you want to give an order to everything click on "Default category" if you haven't renamed it go to the last tab "Category products" and hit "Reset filter" then you'll see all your products.

I recommend using multiples of 10 this way if you want to add something in between you can.

10, 20, 30, 40, etc

  • The question is about the position in search results, not in category view. I tried what you suggested but no effect. So how to do this for search? – george May 2 '15 at 11:43
  • 1
    Check this out: magento.stackexchange.com/questions/44354/… – Hiboomedia May 4 '15 at 15:14
  • Or this one, the second answer, Alex's solution: stackoverflow.com/questions/6304154/… – Hiboomedia May 4 '15 at 15:17
  • thanks for the links. What I am actually looking for is a way to push products up or down in the search results, not simply sort them by name or other. The first link shows some "best seller" sorting which honestly I don't understand. But definitely it would be good to have a way to have some kind of weighted parameters for default sorting. Any idea how to do that? – george May 4 '15 at 20:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.