Search
Our Search Obession
Search is the primary way users find products on our site.
When we started Well.ca, we tried to implement search in the quickest and most naive way possible; by doing a "%LIKE%" query on our database (basically going through every item one by one in the database and seeing if it matches the search term). This worked well for our originally small database, but obviously became unusable as we added thousands of products to our site.
Designing an intelligent search system that finds and sorts the products that users are looking for is a challenge. Below are some of the things we’ve done to improve that.
Rich Autocomplete
As you type in the search box on our site, our software works to quickly present you with previews of the most relevant possible matches for what you’re likely searching for.

”Did You Mean?” Spelling Recommendation Engine
If a user types the incorrect spelling for a word in our catalog, we use double metaphone distance algorithms to suggest alternate spellings.

Most spelling engines are designed for pre-existing dictionaries. But it’s no help for us to recommend an alternative spelling from the english dictionary if that word doesn’t exist in our database in the first place. In addition, many of our product names aren’t in the dictionary
Ranked, Relevant Results

It’s no good for a search engine to return all the words that contain the word “arm” in them, if they aren’t sorted based on relevancy.
Our site uses a separate search appliance that we built ourselves (and integrated with Lucene) to make sure that when a user looks for a product, they find the best matches possible, on the top of the page
Faceted Filtering
Once a search is completed, we use “facets” to help the user narrow down their selection.

