|Search scripts - talk to me!|
| 5:42 pm on Aug 24, 2012 (gmt 0)|
I'm in need of a search script to search my sql database and return results to the user with pagination and extra filters, it has to be clever though, not just a LIKE search, eg If i searched 'designer glasses' i want to see results with designer brand sunglasses not just items with the word designer in the title which is how it is at the moment, so can anyone recommend a script or is it better to go custom?
| 7:34 pm on Aug 24, 2012 (gmt 0)|
Hi. I'm not sure of any good scripts. Seems to me you should be able to throw something "clever" together pretty easy.
|If i searched 'designer glasses' i want to see results with designer brand sunglasses not just items with the word designer in the title |
I would have a drop down/list that could be selected with pre-poulated search values. Such as 'Designer Sunglasses', 'Cheaper Sunglasses', etc... Or have more than one. One that's like that and then another that searches say, manufacturers. Depending on the set search, run the appropriate queries. But still have a search field that can be typed in allowing the users to really drill down a specific search.
As far a pagination. There are lot's of good tut's out there and I'm sure you could find a nice, useful script to use for your needs.
Here is a good one I've used a few times. [phpfreaks.com ]. The script may have to be tweaked in certain ways for your needs which is normally the case with any script.
Just figured I'd toss you a few ideas. Searched are aimed at returning results you will most likely need and want. Give the user the option to choose the type of search they want to do. Search by category. Search by manufacturer. Search by Color. Or type a search for a broader range of results. Just my $0.02
Hopes this helps. Good luck :)
| 1:50 am on Aug 25, 2012 (gmt 0)|
|not just items with the word designer in the title which is how it is at the moment |
They way my ecommerce sites handle that is with a tags or keywords field so all those words don't have to be in the title or description. The search then includes looking for each word in the keywords field as well and then ranks them based on the most popular purchased items in the results.
Make sure you index all these fields properly or you can reduce your search times to something pitifully slow if you have a big database and bring a somewhat busy site's server down to it's knees.
Some of my sites have so many tricked out pages and do so many queries per page (product suggestions, upsells, etc.) that anything short of a quad core CPU looks like it's in slow motion so I run dual quad core CPUs just to keep it humming along.
BTW, once you have all the keywords installed, if you design it cleverly you can make the site really user friendly by offering those lists of keywords along the side of the page in a drill down to shoppers can quickly and easily reduce the subset of products to just what they want just like on the big sites.
| 2:12 am on Aug 25, 2012 (gmt 0)|
Quad core, hmmm, sounds like what I am hankering for now
If you need it, for the sites you describe, and the sites I am aspiring to are on high end hosting set ups, perhaps i do need quad core yumm,
And yes, a decent search and ranking system can be hard on a server, there are many scripts out there, but I guessing all also need power
| 1:54 pm on Aug 29, 2012 (gmt 0)|
Once you learn it the open source project Sphinx Search is incredible. It is not a magical, out-of-the-box script solution. You will have to roll up your sleeves and dig in.
| 9:35 am on Sep 4, 2012 (gmt 0)|
@jon22 - if you want it to be clever, you'd have to introduce some sort of a scoring system based on relevancy. e.g. an item that has the keyword in the title, description and tags row gets a higher score (and is displayed above the less relevant results).
Regarding pagination, see if you can adapt and modify this script phpeasystep.com/phptu/29.html It's pretty good.
|Make sure you index all these fields properly |
@IncrediBILL, I must admit I haven't indexed my database. Can you please point me to some manuals or info on indexing?