Published on

Published in: Technology
1 Comment
1 Like
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. OpenSearch Dr. Harry Chen CMSC 491S/691S March 12, 2008
  2. 2. Agenda <ul><li>What’s OpenSearch technology? </li></ul><ul><li>Overview OpenSearch specification </li></ul><ul><ul><li>Describe an OpenSearch service </li></ul></ul><ul><ul><li>Advertise and compose a search request </li></ul></ul><ul><ul><li>Discover a new OpenSearch service </li></ul></ul><ul><li>Inside OpenSearch application implementation </li></ul>
  3. 3. OpenSearch at
  4. 4. OpenSearch in Firefox
  5. 5. OpenSearch <ul><li>OpenSearch is a set of standards for describing search services and publishing search results on the Web. </li></ul><ul><li>XML is used to describe services and search results. </li></ul><ul><li>Search results are published in a syndication format (RSS or Atom) </li></ul>
  6. 6. Typical OpenSearch Model OpenSearch Client OpenSearch Services
  7. 7. Communication OpenSearch Client (e.g., OpenSearch Services (e.g., IMDB) Query string (plain text) Search results (HTML) HTTP GET request HTTP Response RSS/Atom (XML) You
  8. 8. OpenSearch != Meta-Search Engine <ul><li>OpenSearch is a technology for building search services for the open Web. </li></ul><ul><li>It’s not a search engine or a meta-search engine </li></ul><ul><li>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. </li></ul>
  9. 9. Key Features Autodiscovery Search Result Description Search URL Template Service Description OpenSearch
  10. 10. Service Description <ul><li>An XML document that describes the properties of a search service. E.g. </li></ul><ul><ul><li>“What can you tell me this service?” </li></ul></ul><ul><ul><li>“Who developed this service?” </li></ul></ul><ul><ul><li>“Does this service output adult-content?” </li></ul></ul><ul><ul><li>“What’s the license model for this service?” </li></ul></ul><ul><ul><li>“What’s the URL to call the search service?” </li></ul></ul><ul><ul><li>And more… </li></ul></ul>
  11. 11. An Example <ul><li>Yahoo! Web Search </li></ul>* Defined in gnizr Open Source ** In our gnizr installation:
  12. 12. Publishing the Service Description <ul><li>You announce the availability of the search service by publishing the description document on the Web </li></ul><ul><li>Few options </li></ul><ul><ul><li>Submit the description doc URL to an OpenSearch directory </li></ul></ul><ul><ul><li>Embed a <meta/> tag description in various HTML pages for crawlers to discover </li></ul></ul><ul><ul><li>Describe this information in your RSS feeds </li></ul></ul>
  13. 13. Found a Service, Now what? <ul><li>You need to know how to “invoke” the search request. </li></ul><ul><li>This information is defined in the <Url/> in the service description doc. </li></ul>
  14. 14. Decoding the URL Template <ul><li>The URL template tells the client how to compose a URL used for sending search request. </li></ul><ul><li>It’s a template because it has special syntax for “value-replacement”. </li></ul><ul><ul><li>{searchTerms}  put your search string here </li></ul></ul><ul><ul><li>{startIndex}  return search result from this idx </li></ul></ul><ul><ul><li>Etc. </li></ul></ul>
  15. 15. 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)
  16. 16. Other Terms in the URL Template <ul><li>{count} : # of results per page </li></ul><ul><li>{startPage}: the page number of the set of search result </li></ul><ul><li>{startIndex}: the index of the first search result desired </li></ul><ul><li>{language}: desired language of the search result </li></ul><ul><li>And more… </li></ul>
  17. 17. Try-it-yourself <ul><li>If you feed the URL into your browser… </li></ul>
  18. 18. Reading the Search Result <ul><li>Search Results are usually described in RSS or Atom </li></ul><ul><li>Special OpenSearch vocabularies are used to describe additional search information that can’t expressed in the core RSS or Atom vocabularies. </li></ul>
  19. 19. Result in RSS 2.0 Atom vocab. is used to “point to” the service description URL
  20. 20. Result in Atom
  21. 21. How to Announce the Service <ul><li>Other than manually submit your service description to an OpenSearch directory, you can exploit autodiscovery . </li></ul><ul><li>A standard way for crawlers and clients to discover your services from HTML and RSS. </li></ul>
  22. 22. In HTML Pages
  23. 23. In RSS feeds
  24. 24. An Autodiscovery Example In Firefox, whenever you see a “blueish” icon means an OpenSearch service is discovered.
  25. 25. How Wikipedia Implements OpenSearch  view source Service Description Doc
  26. 26. Try-it-yourself <ul><li>Enter the URL into the browser </li></ul>Do you know how to compose a search request for Wikipedia?
  27. 27. What’s this? a different URL for getting search term suggestions!
  28. 28. OpenSearch dev in Firefox <ul><li> </li></ul>
  29. 29. Summary <ul><li>OpenSearch is a specification for describing and publishing search services on the open Web. </li></ul><ul><li>OpenSearch is not a search engine. </li></ul><ul><li>Many Web sites support this standard, and browsers can recognize and make use these services. </li></ul>