]> git.evergreen-ils.org Git - Evergreen.git/commit
Add pref_ou query filter for preferred library searching
authorDan Scott <dan@coffeecode.net>
Fri, 6 Apr 2012 18:52:20 +0000 (14:52 -0400)
committerDan Scott <dan@coffeecode.net>
Fri, 13 Apr 2012 04:15:02 +0000 (00:15 -0400)
commit0796460961b510e385437c89bd4bf0b9a5ea7f77
treeb86f7bbbf37fece44ee03b20b16adbe1665a795c
parent0c412bed766a5f57ddbfad8ddccd57f24b504621
Add pref_ou query filter for preferred library searching

Include the user's "preferred search library" (as set in search
preferences, falling back to home OU) in searches, specifically for the
purposes of ensuring that located URIs at the user's preferred library
would trigger hits where physical copies would be out of scope.

Practical example:

1. User sets preferred search library to BR1.

2. They jump onto the catalogue, log in (which changes their search org
  to their preferred search library of BR1), but then for some reason
  change their search org in the org selector to BR3.

3. They issue a search for "Harry Potter and the Philosopher's Stone".
  BR3 doesn't hold any copies or have any located URIs, but SYS1 (BR1's
  parent) has a PotterMore licence and has added their 856 $9 SYS1 to a
  bib record.

As it currently stands, User is out of luck; they won't see any hits in
search results as there are no copies or located URIs in the BR3 scope.

The proposed enhancement would, however, make the search results contain
a hit for "Harry Potter and the Philosopher's Stone" at the user's
preferred search library.

Sites can trigger the preferred library as part of the query filters
using the "pref_ou(SHORTNAME)" syntax.

Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/300.schema.staged_search.sql
Open-ILS/src/sql/Pg/upgrade/0704.schema.query_parser_fts.sql [new file with mode: 0644]