Some time back I attempted to make the osCommerce native search function a little more useful by coming up with code to allow the search result to offer alternatives if the product being searched for cannot be found.
My idea was in case of mis-spellings. I gave up as I could not get much of anything to work well, without some major coding. Fast forward about 3 years to now…and a forum post gave me an idea to try…
How it is now
Go to http://demo.oscommerce.com/advanced_search.php and search for the DVD movie called “Beloved”. But deliberarely mis-spell as so; belovd
What is the result?
With my changes, the result would be like this
As you can see, the “Beloved” DVD is returned in a “recommendations” box, even though the search was mis-spelled. This allows the user to easier find what they are looking for.
Another example is the mis-spelling “matrex” – is the person looking for “The Matrix” or “Matrox G200”? Try it at the osCommerce Demo Search Page – no result!
And now watch the video showing the “belovd” search and the “matrEx” search;
I’m still working on the codebase, so if anyone has any input let me know. Should this “fuzzy” search also give results when an exact match IS found? Eg, if a search is made for Matrix, should the Matrox products also show in the search results?
Updated Video, based on Isa’s idea for similar searching