[OPEN-ILS-DEV] Supercat and rss feeds

Mike Rylander mrylander at gmail.com
Thu Oct 13 16:34:39 EDT 2011


On Thu, Oct 13, 2011 at 3:17 PM, Whalen, Liam
<Liam.Whalen at nrcan-rncan.gc.ca> wrote:
>> > The benefit of using OpenSearch, I hope, is that it will exclude records
>> that do not have copies associated with them.  If that is true, then all I
>> need to know is how to return a list of the most recent
>>> additions to the catalogue via OpenSearch, and how to limit the results
>>> of to a specific format like Journals.  Does anyone know how to do that?
>> Assuming EG 2.0 or later, ou wat to add "sort(create_date) #descending"
>> (IIRC) to the query portion of the url.
>
> Thanks for the tip, that let me know it was possible.  I've gotten a little
> farther.  Now I have the following OpenSearch string:
>
> http://dev.catalogue.nrcan.gc.ca/opac/extras/opensearch/1.1/-/rss2-full?searchTerms=rock+fissures&searchType=keyword&count=50&searchSort=create_date&searchSortDir=desc
>
> searchSort=create_date, and searchSortDir=desc let me get the newest
> records.  However, I now need to figure out how to use searchTerms to return
> all records.  I've tried setting searchTerms to an empty string, and I've
> tried omitting it from the URL, but I'm not sure what sort of results that
> is returning.  As well, I do not get the same number of records when using
> OpenSearch that I get through the catalogue.  In the above search I get over
> 500 results from the catalogue.  However, I have requested 50 items
> through the count option in the URL, but I get less than 50 returned.  Is
> OpenSearch supposed to act like the catalogue, or am I trying to make it do
> things it wasn't designed to do?
>

It all depends on what you're really trying to get.

For instance, you can browse by item age (that is, a "new items on the
shelf" list) which is per-site, but can't be limited by search
criteria ( http://mtester.esilibrary.com/opac/extras/browse/rss2-full/item-age/SYS1
).  Or, as you saw with the freshmeat feed, you can browse by
cataloging activity (import or edit), globally.  With OpenSearch,
simply adding "sort(create_date)#descending" (url-encoded, of course)
to the searchTerms param (or even alone, with no other search
criteria: http://mtester.esilibrary.com/opac/extras/opensearch/1.1/SYS1/rss2-full?searchTerms=sort(create_date)%23descending
), and /not/ specifying searchSort or searchSortDir params, will give
you the power to limit and sort by cataloging date.  Replace the
sort() axis with edit_date to get the equivalent of the freshmeat
edit-time feed.

That's not, per se, an abuse of OpenSearch -- at least not in
Evergreen's context -- because Evergreen explicitly allows the full
power of its search grammar (
http://evergreen-ils.org/dokuwiki/doku.php?id=documentation:technical:search_grammar
) in the OpenSearch searchTerms parameter.

-- 
Mike Rylander
 | Director of Research and Development
 | Equinox Software, Inc. / Your Library's Guide to Open Source
 | phone:  1-877-OPEN-ILS (673-6457)
 | email:  miker at esilibrary.com
 | web:  http://www.esilibrary.com


More information about the Open-ils-dev mailing list