Creating Refinements

You can create refinement labels and tag sites with them in the Refinements Tab of the CSE Control Panel, but you can have greater control over the ranking if you are using the Custom Search XML Annotations file.

If you don't want to include PageMap data in the HTML of your pages, you can add PageMap data to a Sitemap and submit that Sitemap for on-demand indexing.

To add a refinement to custom search using PageMaps added to the Google Sitemap, you should:: * Go to the Refinement Tab and add a refinement * Choose "Give priority to labeled sites" * Add something like "more:pagemap:books" * Repeat the above for more refinements

You add the text more:pagemap:books to the "Word(s) to add to the search query: (optional)" text box.

The first thing to do is to customise each url entry in the plain Google Sitemap with an extra <PageMap> tag.

<url> <loc> <PageMap> <DataObject type> <attribute name>

Suppose you've defined PageMaps with a "pagetype" attribute as in this example:

There are two ways to create the refinements lables that show up in the custom search pane, first by using the Control Panel, and second by editing and then submitting a specialised XML file.

# Demo

This demo (try searching for, say, "pizza") was built exactly the same as I described above, so you should be able to do it: googlecustomsearch.appspot.com

The <PageMap> tag wraps one or more DataObject tags, in a Google Sitemap or the markup fo an HTML page.