[OPEN-ILS-DEV] Opensearch grammar and item_type() with ||

Mike Rylander mrylander at gmail.com
Mon Nov 14 13:53:04 EST 2011


On Mon, Nov 14, 2011 at 1:45 PM, Whalen, Liam
<Liam.Whalen at nrcan-rncan.gc.ca> wrote:
> I have the following opensearch url that worked on an Evergreen 2.0.8, PostgreSQL 9.0.4, OpenSRF 2.0.1, and Ubuntu 10.04 system:
>
> http://catalogue.nrcan.gc.ca/opac/extras/opensearch/1.1/NRCan-RNCan/rss2-full?searchTerms=item_type%28a%20||%20t%29&searchSort=create_date&searchSortDir=desc
>
> This no longer works on an Evergreen 2.1.0a, PostgreSQL 9.0.4, OpenSRF 2.0.1, and Ubuntu 10.04 system.  However, if I removed the '|| t' in the item_type() qualifier, the search now works:
>
> http://catalogue.nrcan.gc.ca/opac/extras/opensearch/1.1/NRCan-RNCan/rss2-full?searchTerms=item_type%28a%29&searchSort=create_date&searchSortDir=desc
>
> It seems using || within an opensearch string may not be working as it is supposed to.

Nope, "||" was never supposed to work within the param list for
QueryParser filters.  Un-URL-escaping your 2.0 URL, you were sending
"item_type(a || t)" -- but that only worked because of a side effect
of how list splitting was done in 2.0 (specifically, we used to split
on spaces, but we don't any longer as a space may be exactly what you
want to filter on).  The correct spelling of "filter on item_type of
either 'a' or 't'" has always been "item_type(a,t)" -- a
comma-separated list.

-- 
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