Thursday, March 27, 2008

Labels in Custom Search



Last month we demonstrated how to specify URL patterns in your CSE. We now explain another powerful concept in Custom Search: labels, which are also known as refinements. Labels are typically displayed above the search results.
Let's revisit our I Love Veggies search engine. When the user searches for "eggplant", we display some categorical refinements above her search results such as: recipes, nutrition, farmer's markets, and growing tips. When she clicks the "recipes" refinement, for example, our CSE emphasizes eggplant recipes in her search results.

To make refinements, do the following:

1. Create refinement labels.

To add a refinement to your custom search engine, go to the Refinements tab in the control panel, then click the Add Refinement button. Enter a refinement label and its associated keywords, and choose how to prioritize the labeled sites. You can enter one of our predefined refinements or create one of your own.

2. Tag sites with refinement labels.

Once you have configured your refinements, go to the Sites tab in the control panel. Choose some sites (URL patterns) using the checkboxes, then choose a label from the Label actions drop-down list. You can attach any number of labels to each site. For example, if a site includes nutritional information with its recipes, you could label it with both the "recipes" and the "nutrition" refinements. Labeling your sites properly enables your users to find sites that are relevant to each refinement. In addition, by showing meaningful labels under each search result, you enable your users to find similar results quickly. The Custom Search Help Center has helpful hints on how to choose good refinements.
And this is how to create refinements and assign their labels to your sites using the Custom Search control panel. We'll show you advanced refinement management using XML in another post soon.