0

Here is a major problem we've had from Magento 1.4 that is still a problem in Magento CE 1.8.1.

If you search for a product the results that come back are not what you'd expect.

For example if I search for Canon 6D then the top search result is Canon EOS Rebel SL1 (Body Only), even though there is a product whose title is exactly "Canon 6D".

Then if I search for only 6D then the top search result is Nikon AF Nikkor 70-300 f/4-5.6D ED Telephoto Zoom Lens... because, I guess, it has the two characters "6D" next to each other somewhere in the title? Below that is Nikon D800 36.3 MP CMOS FX-Format Digital SLR Camera (Body Only) which doesn't even have the characters "6D" found together anywhere in the title at all.

When I have done some research into this, I keep finding people who are saying that it's just how Magento is, and the only way to fix it is either override the core code with some hack or another, or, use an extension.

I found a free extension that uses Apache SOLR, but it requires the installation of SOLR first, which is fairly complicated, and I'm not even sure our hosting provider would allow that, since it runs in Java and I don't know if our server has the right version of JRE etc. So this solution is very much not ideal.

Then there are some very expensive paid extensions, and I'm sure I can't get approval for that.

It just makes me wonder if there might be something corrupt about our particular Magento installation, and if so, what might it be? What would cause this? Maybe we have some old extension hidden somewhere, screwing things up, or maybe our database is corrupted. What do you think?

I'm don't want to believe that this is just how Magento is, even though I've seen plenty of posts on the Magento forums that complain of this same issue. I know there are several old bugs that keep not getting fixed in Magento CE, but surely the developers of Magento would fix search if it was broken, since it's arguably the most important feature of an e-commerce site.

So what's the deal? Please help. Thanks.

  • 1
    Internal Magento search is <50% accurate, Sphinx/Lucene 60-80% accurate, Solr is 98% accurate. It really is that simple, seems you are happy with Solr which is the way to go. – user2935 May 22 '14 at 15:33
  • Don't even bother with Solr.... took us ages to get it working and Magento only seems to support version 3.6.2, while the actual Solr is way past version 6. The endresult is very dissappointing. It has a few extra features like suggestions, but they only appear by random and are very inaccurate. The whole search is inaccurate and a waste of time. Get a third party search indexer or just use mysql – leedch Jun 20 '16 at 15:39
1

In super-short: see Search Type: Like, Full Text or Combined?

In short, Magento's default search is not great.

That said, all I can really recommend is tweaking/configuring to improve the search behavior. Some things to consider (if you have not already):

  • Tweak product attributes to limit which attributes are being searched - if all you care about is the product name and description, considering setting the "searchable" field to false for other fields. This may not meet your requirements, but it might be worth experimenting with
  • Use the "search terms" feature of Magento (Catalog -> Search Terms). If you want "6D" to always bring customers to the 6D body (or kit, etc) product page, you can do that with the search terms feature. This is perhaps not a solution the bad search, but at least can help triage some of the more important search terms and fix the most common problem terms.
  • Consider tweaking the Search Type (System -> Configuration -> Catalog (left) -> Catalog Search) and again, read more here

In my experience with search in Magento, no search is going to be absolutely perfect out of the box. I think that Search Terms is actually a great tool for helping you get a handle on major problem areas, and some tweaking of Magento search options/attributes can make the default search at least workable. Magento's SOLR implementation is notoriously bad (and in my experience, that's relatively accurate). There are great third party modules out there (my company is actually developing one), but as you said they do require a bit more setup, and again, even still you're going to need to tweak things.

0

I found a free Magento extension that lets it work with Apache Solr and worked with SOLR 4.x. It is totally awesome and works perfectly, although it does require a bit of setup as warned.

Note that to make the search query "55-200" return items called "55-200mm" I had to add this filter to the text_general's index analyzer in schema.xml's types area:

<types>
    <fieldType name="int" class="solr.TrieIntField" precisionStep="0" positionIncrementGap="0"/>
    <fieldType name="string" class="solr.StrField" sortMissingLast="true"/>
    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" positionIncrementGap="0"/>
    <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100">
        <analyzer type="index">
            <tokenizer class="solr.StandardTokenizerFactory"/>
            <filter class="solr.LowerCaseFilterFactory"/>

            <!-- here is the line I added:-->
            <filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="25" />

        </analyzer>
        <analyzer type="query">
            <tokenizer class="solr.StandardTokenizerFactory"/>
            <filter class="solr.LowerCaseFilterFactory"/>
        </analyzer>
    </fieldType>
</types>

I'm now convinced that Magento should simply ship with Solr. It's so much better it's not even funny.

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.