Simple Search
A text entry field with a button that is labelled 'Search'. This pattern removes the need for 'Search' as a title if there is a real estate problem.
Best Practice Guidelines (from Serco Usability)
SEARCH ACROSS FIELDS.
Free your search. Don't make users specify which words are in which fields. Allow users to type whatever words they want, and look everywhere. If they're searching for a performance, don't make them specify whether they've typed in a word from the title or the name of an actor, show them all. Sure you can provide a more advanced search that lets users be more specific, but the default should be to search everywhere. That's what users expect these days. For good examples, see iTunes or Froogle.
ASSUME "AND".
If a user types two words into a search box, say TEENAGE ENNUI, there are several ways it could be interpreted. It could mean to find any item that contains the phrase "TEENAGE ENNUI" with the words next to each other in that order, it could mean to find all pages with the word TEENAGE plus all the pages with the word ENNUI, or it could mean all the pages that contain both words. It turns out that users almost always expect this last interpretation. Don't disappoint them.
LOOK FOR METATOPICS TOO.
Most sites search only for the topics or items that the site specialises in, but not for related information pages. Book sites only search for books, news sites only for news, etc. But users often use search to find information related to consumer-oriented topics: how to find a bookstore's high street opening hours for example, or how to send a letter to the editor. If you want to see a site that does it well, go to Amazon.com and search for RETURNS. (It doesn't work on the UK site, only on the US site.)
FIND CATEGORIES.
Users will search for categories of items, not just items themselves. In grocery sites, they'll type "spices" or "vegetables" (not just "paprika" or "okra"), or on a council website they might type "schools" instead of "Churchill Comprehensive". Allow users to see the high-level categories in the search results. For an example of where it works well, go to Sainsbury's and search for "spices".
OFFER TIPS.
Have a small link adjacent to the search box labelled "Search Tips" that links to lots of examples.
RESULTS PAGES.
On the results page:
- SORT BY RELEVANCE. We can't offer a general rule here as expectations differ widely area by area, but do study your own domain. In the grocery domain, if a user types tomatoes, fresh tomatoes should be at the top of the list, and fajita package that has tomatoes as the 12th ingredient should be lower on the list. On council sites, if a user types "tip", the opening hours of the local waste disposal facility should be before "17 tips for a better environment".
- BE HONEST. Tell users how you're sorting, and don't let vendors buy better places on the results list without telling your users.
- SHOW WHY A RESULT APPEARS. Users should be able to tell at a glance why each result was selected. Many sites do this by highlighting target words in the results.
- REPEAT THE CRITERIA. List the criteria that the user chose near the top of the results so users can see whether they made a typing mistake. You can also add a line that explains how the criteria was interpreted, for example, 'You searched for items containing the words SPICY and CURRY'.
- FORGIVE SPELLING MISTAKES. If you detect the user may have made a spelling mistake, offer alternative searches with the correct spelling. Most people are terible spelers.
- MAKE IT EASY TO REVISE. Allow users to refine their search on the results page. Don't make them go back a step.
- DON'T BE STINGY. Connection speeds are fast these days. Consider giving users 20-25 results per page, minimum. Users would rather scroll than page.
Finally and most importantly, if you don't have a good search function, don't make it so tempting. People are much more successful browsing than using a poor search, so if you're not confident, don't put a search box on every page. Instead, put a link to search on every page. That one extra click will subtly direct users to browse rather than search.
But if you know you've got a great search function, flaunt it. Users will use it, and praise your name with every result found.
Good article on UXmatters.com:
Evaluating the Usability of Search Forms Using Eyetracking
http://www.uxmatters.com/MT/archives/000068.php