Some time back, Janine of Special Little People asked me how she could add a search facility to her website. Here are some options that are available.
As with everything there are a number of options for this, some of which are more effective than others, some of which cost more than others and some which are more elegant than others. My initial attempt was to use a tool that Google provides by which you can add a search box to your website. This lets users search your website or search the Web and is called Google Adsense for Search. This is a popular choice with webmasters because if users click on any sponsored links, then Google will share part of the advertising revenue with you. The downside of this solution is that you have very little control of how the search box looks or what the returned results look like. You can theme the page, but it’s very apparent that your user has left your website.
At the opposite end of the spectrum, you can purchase search engine technology to fit into your website. For example, Google sells it’s Search Appliance at prices starting around $2000 for sites containing up to 50,000 documents. This can be integrated with your website and your viewes can enjoy a seamless experience.
I finally decided to take a middle-of-the road approach. We implemented a spider that crawls the website, builds an index of all the content and lets users search for anything they might be interested in. The spider used was an open source product called Sphider which is a lightweight indexing engine using PHP and mySQL and lent itself quite well to the task at hand.
So many options, huh?