Search service

This is not technically required, but unless your collection is very small, readers will expect to be able to search it. If you don't deal directly with readers, then you probably don't need this feature.


Opensearch

You can implement your search service however you want. The SimplyE Collection implements it with an Amazon Lambda service; the circulation manager uses a wrapper around an ElasticSearch. The only restrictions are:

  • Your search service must be advertised with an OpenSearch document.
  • Your search service must serve its search results in the form of an OPDS feed.

You advertise your search service by linking to the OpenSearch document from your OPDS feeds.

Here's an example from The SimplyE collection:


<link href="https://instantclassics.librarysimplified.org/search" type="application/opensearchdescription+xml" rel="search"/>
Fetch that document and you'll see that it explains how to construct a URL that performs a search:
<?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>Search</ShortName> <Description>Search</Description> <Tags></Tags> <Url type="application/atom+xml;profile=opds-catalog" template="https://instantclassics.librarysimplified.org/search?q={searchTerms}"/> </OpenSearchDescription>
Build a search URL, send a GET request to it, and you'll get an OPDS Feed of search results.


  • No labels