29
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/us/ OpenSearch Dr. Harry Chen CMSC 491S/691S March 12, 2008

OpenSearch

  • Upload
    hchen1

  • View
    5.616

  • Download
    0

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: OpenSearch

This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/us/

OpenSearch

Dr. Harry Chen

CMSC 491S/691S

March 12, 2008

Page 2: OpenSearch

Agenda

What’s OpenSearch technology?Overview OpenSearch specification

Describe an OpenSearch service Advertise and compose a search request Discover a new OpenSearch service

Inside OpenSearch application implementation

Page 3: OpenSearch

OpenSearch at a9.com

Page 4: OpenSearch

OpenSearch in Firefox

Page 5: OpenSearch

OpenSearch

OpenSearch is a set of standards for describing search services and publishing search results on the Web.

XML is used to describe services and search results.

Search results are published in a syndication format (RSS or Atom)

Page 6: OpenSearch

Typical OpenSearch Model

OpenSearch Client

OpenSearch Services

Page 7: OpenSearch

Communication

OpenSearch Client(e.g., a9.com)

OpenSearch Services(e.g., IMDB)

Query string (plain text) Search results (HTML)

HTTP GET requesthttp://foo.com/os?q=stuff

HTTP ResponseRSS/Atom (XML)

You

Page 8: OpenSearch

OpenSearch != Meta-Search Engine

OpenSearch is a technology for building search services for the open Web.

It’s not a search engine or a meta-search engine But, you can use this technology to build meta-

search engines, vertical-market search engines, your-personal-search engines, my-social-network-search engines etc.

Page 9: OpenSearch

Key Features

Autodiscovery

Search ResultDescription

Search URL Template

ServiceDescription

OpenSearch

Page 10: OpenSearch

Service Description

An XML document that describes the properties of a search service. E.g. “What can you tell me this service?” “Who developed this service?” “Does this service output adult-content?” “What’s the license model for this service?” “What’s the URL to call the search service?” And more…

http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_3#OpenSearch_description_elements

Page 11: OpenSearch

An Example

Yahoo! Web Search

* Defined in gnizr Open Source

** In our gnizr installation:http://eb1.cs.umbc.edu:8080/gnizr/settings/opensearch/yahoo-searchdescription.xml

Page 12: OpenSearch

Publishing the Service Description

You announce the availability of the search service by publishing the description document on the Web

Few options Submit the description doc URL to an OpenSearch

directory Embed a <meta/> tag description in various HTML

pages for crawlers to discover Describe this information in your RSS feeds

Page 13: OpenSearch

Found a Service, Now what?

You need to know how to “invoke” the search request.

This information is defined in the <Url/> in the service description doc.

Page 14: OpenSearch

Decoding the URL Template

The URL template tells the client how to compose a URL used for sending search request.

It’s a template because it has special syntax for “value-replacement”. {searchTerms} put your search string here {startIndex} return search result from this idx Etc.

Page 15: OpenSearch

An Yahoo! example

Place your search query here.(e.g., java)

Where you want the index to start for the matching search results(e.g., 1)

Page 16: OpenSearch

Other Terms in the URL Template

{count} : # of results per page {startPage}: the page number of the set of

search result {startIndex}: the index of the first search result

desired {language}: desired language of the search

result And more…

http://www.opensearch.org/Specifications/OpenSearch/1.1/Draft_3#OpenSearch_1.1_parameters

Page 17: OpenSearch

Try-it-yourself

If you feed the URL into your browser…

Page 18: OpenSearch

Reading the Search Result

Search Results are usually described in RSS or Atom

Special OpenSearch vocabularies are used to describe additional search information that can’t expressed in the core RSS or Atom vocabularies.

Page 19: OpenSearch

Result in RSS 2.0

Atom vocab. is used to “point to” the service description URL

Page 20: OpenSearch

Result in Atom

Page 21: OpenSearch

How to Announce the Service

Other than manually submit your service description to an OpenSearch directory, you can exploit autodiscovery.

A standard way for crawlers and clients to discover your services from HTML and RSS.

Page 22: OpenSearch

In HTML Pages

http://www.opensearch.org/Specifications/OpenSearch/1.1

Page 23: OpenSearch

In RSS feeds

http://www.opensearch.org/Specifications/OpenSearch/1.1

Page 24: OpenSearch

An Autodiscovery Example

In Firefox, whenever you see a “blueish” icon means an OpenSearch service is discovered.

http://en.wikipedia.org/wiki/Opensearch

Page 25: OpenSearch

How Wikipedia Implements OpenSearch

http://en.wikipeida.org view source

Service Description Doc http://en.wikipedia.org/w/opensearch_desc.php

Page 26: OpenSearch

Try-it-yourself

Enter the URL into the browser

Do you know how to compose a search request for Wikipedia?

Page 27: OpenSearch

What’s this?

a different URL for getting search term suggestions!

Page 28: OpenSearch

OpenSearch dev in Firefox

http://developer.mozilla.org/en/docs/Creating_OpenSearch_plugins_for_Firefox

Page 29: OpenSearch

Summary

OpenSearch is a specification for describing and publishing search services on the open Web.

OpenSearch is not a search engine.Many Web sites support this standard, and

browsers can recognize and make use these services.

http://opensearch.org