Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

  • Roller must return an OpenSearch descriptor describing Roller's search interface
  • Roller search feeds should contain OpenSearch extension elements with additional metadata

Issues

None identified.

...

No real issues to discuss, but here is background to consider:

This development will complement Roller's existing search facilities:

  • SearchServlet. Currently, we have a SearchServlet that displays search results within the
    context of a weblog. If the weblog is a site-wide aggregated weblog, then the
    search results are site-wide. URL is of this format:
    • <ctx>/<weblog-handle>search?q=<search-term>
  • FeedServlet. We also have a FeedServlet that dislays feeds in RSS/Atom formats and search
    feeds in Atom format. The URL is of this format:
    • <ctx>/<weblog-handle>/feed/entries/atom?q=<search-term>
  • Feed History is supported in search feeds via link elements with 'next' and 'previous' relations.

Design

OpenSearchServlet.java

  • Introduces two new URI structures
  • /roller-services/opensearch: returns descriptor for site-wide search (i.e. against main blog)
  • /roller-services/opensearch/<weblog-handle> - returns descriptor for weblog search

FeedServlet.java

  • Minor refactoring to add two templates for search result feeds
  • weblog-search-atom.vm
  • site-search-atom.vm

URLModel.java, URLStrategy.java

  • New methods for returning URI of OpenSearch descriptor

WEB-INF/velocity/weblog.vm

  • Add OpenSearch descriptor links to showAutodiscoveryLinks macro, like so:
    Code Block
    
        #if ($site)
            <link rel="search"
                title="OpenSearch Descriptor for $config.siteName"
                type="application/opensearchdescription+xml"
                href="$url.absoluteSite/roller-services/opensearch" />
        #else
            <link rel="search"
                title="OpenSearch Descriptor for weblog $model.weblog.name"
                type="application/opensearchdescription+xml"
                href="$url.absoluteSite/roller-services/opensearch/$model.weblog.handle" />
        #end
    

Comments

Please comment on the Roller dev mailing list.