Now, our metadata support just got a whole lot better!
Thumbnails and Actions
If you use the Custom Search Element, you can now add publisher-provided links to your search results based on specific metadata markup in your web pages. These special structured data objects, such as Thumbnails and Actions, are generated from the PageMaps you provide. For example, Scribd, one of our partners, provides both Thumbnails and Actions in PageMaps on their pages, so we display both of these in our sample Custom Search engine, as shown below. The Actions in this case are "Download" and "Fullscreen View", but each publisher can provide customized actions, which they can also style via CSS.

If you markup your own pages, as shown above, the Element will render your Thumbnails and Actions in your own Custom Search engine.
<PageMap>
<DataObject type="thumbnail">
<Attribute name="src" value="http://i5.scribdassets.com/public/images/uploaded/70327880/D9mDLlYzlw_thumbnail.jpeg"/>
<Attribute name="width" value="100"/>
<Attribute name="height" value="130"/>
</DataObject>
<DataObject type="action">
<Attribute name="label" value="Download"/>
<Attribute name="url" value="http://www.scribd.com/document_downloads/20258723?extension=pdf"/>
<Attribute name="class" value="download"/>
</DataObject>
<DataObject type="action">
<Attribute name="label" value="Fullscreen View"/>
<Attribute name="url" value="http://d1.scribdassets.com/ScribdViewer.swf?document_id=20258723&access_key=key-27lwdyi9z21ithon73g3&version=1&viewMode=fullscreen"/>
<Attribute name="class" value="fullscreen"/>
</DataObject>
</PageMap>
Structured Search
The above example shows how easy it is for you to add valuable metadata to your pages for use in display in Custom Search results. So, in the sample engine that we used above, here's what the result looks like when you type the query [halloween]. We see a set of nicely formatted results that match the query.


The PageMap that represents the document and author information in the markup of the above pages is as follows:
You can provide hooks in your application to filter results by attributes that are important for your users, so users will not have to type these restriction qualifiers directly.
<PageMap>
<DataObject type="document">
<Attribute name="title">The Five Scariest Traditional Halloween Stories</Attribute>
<Attribute name="author">lisamorton</Attribute>
</DataObject>
</PageMap>
Rich Snippet Preview Tool
Check out the Rich Snippet preview tool. This tool allows you to view not only the Rich Snippets markup recognized for Google web search, but also the additional customized markup that we support in Custom Search. You can immediately see how your web page will be processed after indexing, and what metadata attributes will be returned in PageMaps in your Custom Search results. If there are any errors in your markup, you can fix them right away! Remember - you need to add the &view=cse parameter to this tool to review the additional metadata extracted by Custom Search.
Here's a screenshot from the tool for one of the above results, showing all the PageMap markup recognized by Custom Search:

No comments:
Post a Comment