31
Ange Oct. 1, 2009

TWOHD_Search Monkey

  • Upload
    jh-lee

  • View
    1.062

  • Download
    0

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: TWOHD_Search Monkey

Ange

Oct. 1, 2009

Page 2: TWOHD_Search Monkey

Agenda

• What / Why Search Monkey• How does it work?• Examples• Developer Tool

Page 3: TWOHD_Search Monkey

What is SearchMonkey?

• Search Monkey is an open platform for using structured data to build more useful and relevant search results.

• Query “Ang Lee” in Y! search• Before:

• After:

Page 4: TWOHD_Search Monkey

Why SearchMonkey?

• Y! Search User– get more rich information and good user

experiences

• Site Owner, Developer– customized presentation and bring more traffic to

their sites

Page 5: TWOHD_Search Monkey

How does it work?

• Site owners/publishers share structured data with Yahoo!

• Site owners & third-party developers build SearchMonkey apps

• Consumers customize their search experience with Enhanced Results or Infobars

Page 6: TWOHD_Search Monkey

User Side (enable an application)

• Choose a specific monkey from Search Gallery. http://tw.gallery.search.yahoo.com/

• Some apps are default for search.

Page 7: TWOHD_Search Monkey

Search Gallery

Page 8: TWOHD_Search Monkey

User Side (view and enable)

• Login• Select an

application • Preview the result• Save the selected

application• Example:

Wikipedia

Page 9: TWOHD_Search Monkey

Query ‘哈利波特’ in Y! Search

Page 10: TWOHD_Search Monkey

Developer Side

• Go to Dev Tool– http://developer.search.yahoo.com/

• Presentation Layer– Presentation Applications are small PHP apps that display

enhanced search results using data services.

• Custom Data Services– Data Services provide structured information to display in

Yahoo! Search results.

• Data Feeds– Data Feeds are XML feeds in SearchMonkey's native

DataRSS format. Site owners can submit structured data to Yahoo! Search for inclusion in the Yahoo! Index.

Page 11: TWOHD_Search Monkey

I want to build YouTube Monkey

• Youtube presentation in Y! web search result:http://tw.search.yahoo.com/search?p=%E5%BC%B5%E7%91%9E%E5%B8%8C+youtube

Page 12: TWOHD_Search Monkey

YouTube Video Page

Page 13: TWOHD_Search Monkey

Custom Data Services

• Data Services provide structured information to display in Yahoo! Search results.

• You can create a custom data service by calling an API or by extracting structured data from web pages.

• You can create a new data service, start with a sample data service or import data service.

• Basic Info -> URLs -> Data Extraction -> Confirmation

Page 14: TWOHD_Search Monkey

Step 1: Specify you custom name, type, description

Page 15: TWOHD_Search Monkey

Step 2: Specify your trigger and test URLs

• Specify a url pattern to match against search results and trigger your data service.

• Multiple wildcards are supported—you may begin and end your pattern with a wildcard, "*", which matches any string.

• Add test urls• Auto find urls

Page 16: TWOHD_Search Monkey

Step 3: Define your page extraction rules

• Specify XSLT code for extracting information from the page and representing that information as DataRSS. – XSLT is a language for transforming XML documents into

other XML documents.– XSLT makes use of the expression language defined by

XPATH for selecting elements for processing.

• For assistance with writing XPATH expressions, try the XPather FireFox extension.– https://addons.mozilla.org/en-US/firefox/addon/1192

Page 17: TWOHD_Search Monkey
Page 18: TWOHD_Search Monkey

Step 4: Confirmation

Page 19: TWOHD_Search Monkey

Create a New Application

• Presentation Applications are small PHP apps that display enhanced search results using data services.

• You can use an existing data service or create a custom service below.

• You can create a new application, start with a sample application or import application.

• Basic Info -> URLs -> Data Services -> Appearance -> Confirmation

Page 20: TWOHD_Search Monkey

Step 1: specify your application’s name, type and description

Page 21: TWOHD_Search Monkey

Presentation Templates (Enhanced Result)

• Enhanced Result– Overwrites the search result itself — it can change

the title, the summary, and more.– They are limited to a specific set of

presentation elements, arranged in a particular format.

– Title, Summary, Image, Link, Dict

Page 22: TWOHD_Search Monkey

Presentation Templates (Infobar)

• Infobar– An expandable pane beneath a search result that

provides additional information about the result.– You can also use general HTML markup to create

much more customized Infobars.

Page 23: TWOHD_Search Monkey

Step 2: Specify your trigger, test URLs

Page 24: TWOHD_Search Monkey

Step 3: select one or more data services

Page 25: TWOHD_Search Monkey

Step 4: Map your data services to presentation layer

Page 26: TWOHD_Search Monkey

Presentation Application PHP

• ['title'] • ['summary'] • ['image']['src'], ['image']['alt'], ['image']['title'], ['image']

['allowResize']• ['links'][n]['text'], ['links'][n]['href']• ['dict'][n]['key'], ['dict'][n]['value'],

• ['infobar']['summary'], ['infobar']['blob']

Page 27: TWOHD_Search Monkey

Step 5: Confirmation

Page 28: TWOHD_Search Monkey

Publish Your Application

• Three basic version types– Dev: private– Sharable: useable by any logged-in user

– Gallery: a repository of high-quality applications • You also can use the ‘export’ and ‘import’ functions to

share your code with your colleagues.

Page 29: TWOHD_Search Monkey

After Publishing with Sharing

(Ange YouTube) http://gallery.search.yahoo.com/application?smid=SW1.s

Page 30: TWOHD_Search Monkey

Try it on SRP

Page 31: TWOHD_Search Monkey

Reference

• YDN– http://developer.yahoo.com/searchmonkey/

• Documentation – http://developer.yahoo.com/searchmonkey/smguide/

• Dev Tool– http://developer.search.yahoo.com/wizard/index