(Click image to enlarge.)
Earlier this week we soft-launched a new service: nature.com OpenSearch. Simply put, nature.com OpenSearch provides a structured resource discovery facility for content hosted on nature.com. In effect, this is a sister service to our regular nature.com search service which allows a user to query nature.com and browse the result sets. By contrast, the new service allows applications to query nature.com and to fetch the results back in formats of their choosing. The diagram above attempts to compare the existing user-oriented nature.com search service at a) with the new application-oriented nature.com OpenSearch service at b). Applications from widgets to web pages (and beyond) are the immediate clients of the service. (A companion post here already discussed the new nature.com search search widgets which are one such application.)
In terms of interfacing to the service, machine-readable description documents are available for both OpenSearch and SRU (Search and Retrieval via URL) modes of access. These documents are referenced from autodiscovery links which are beginning to be added to all our nature.com web pages. Each web page thus links not only to our search, but more than that it provides the instructions on ‘how to search’.
Query is either by simple search terms or by the query language CQL which is a high-level query language designed to be be human readable and writable, and to be intuitive while maintaining the expressiveness of more complex languages. Result sets can be returned in a variety of media types, both text (HTML and JSON) and XML (SRU, ATOM, RSS). Media types are selectable using HTTP content negotiation or by using the specific parameter ‘httpAccept’.
(Click image to enlarge.)
And what does this all mean? Well, it really amounts to the ability to run off-platform search, i.e. I can now run my search over nature.com anywhere I choose to run it. For example, say I want to run it right here in this blog post, I can. Let’s jig up a simple interface. What we’ll do is to run a full-text keyword search and just list out the raw properties of the first item returned with no real attempt at styling. (The CQL checkbox just allows a CQL query to be input, otherwise the search terms are sent to the server as simple alternates.)
We would be very pleased to receive any feedback on this service. You can post comments either here on the blog or else you can mail them direct to email@example.com.
The nature.com OpenSearch service has two access points:
- User interface:
- Service endpoint:
Technical documentation on the service is available here on our Librarian Gateway.
Special credits go to Ralph LeVan of OCLC for not only creating the excellent open-source oclcsrw software package but also updating the package to support HTTP content negotiation and to make this generally more responsive to OpenSearch requests such as allowing for alternate formats. We’d like especially to thank Ralph for suffering our numerous questions and for responding to our various requests for new features in a very timely fashion so as to make this service possible within the project timelines. Thanks are also due to Nawab Siddiqui of Nature Publishing Group for doing the actual hard graft in implementing this service for nature.com and also for leaping agilely into this new terrain.