[OPEN-ILS-GENERAL] Reintroducing search range-like features in TPAC

Dan Scott dan at coffeecode.net
Sun Dec 11 22:01:38 EST 2011


On Tue, Dec 06, 2011 at 03:18:48PM -0500, Kathy Lussier wrote:

<snip>
 
> MassLNC would like to suggest that we add an element that also identifies
> the user's preferred local library. This library would default to the user's
> home library, but could be changed via the user's preferences. A library
> should also be able to provide a link to the catalog that identifies this
> preferred local library so that, for example, if a user is searching the
> catalog from inside the library without logging in, that library's holdings
> information will be highlighted, even if the user is searching the entire
> consortium. 
> 
> If the user were to change their scope to a different library, then the
> catalog should highlight the holdings of that scoped library. However, if
> the user were searching the entire consortium, the catalog should highlight
> the holdings of their preferred local library.
> 
> We have pulled together some requirements and mock-ups for the information
> we would like to display on the search results and record detail pages
> depending on what is being scoped and whether there is a preferred local
> library. You can view them at http://masslnc.cwmars.org/node/2454.
> 
> We welcome any thoughts or suggestions on the best way to get this rolled
> into the TPAC.

Great, thanks Kathy (and MassLNC) for the thoughts on search range in
TPAC. I like the move away from a separate "search scope" widget, as in
our experience people seemed to get very confused by the separation of
search depth from what they had chosen in the library selector widget.
Simplifying things such that there's just one hierarchical library
selector that determines scope, plus a possible "preferred location"
that drives some additional behaviour in terms of which results are
displayed first, sounds like a more intuitive experience.

As for one of the elements of MassLNC's document, requesting that copies
be sorted first by library name and then by call number, I've taken a
stab in that direction by making a branch such that volumes within the
unapi.holdings_xml database function sort by library name and then call
number label. There is still a loophole: copies that are circulating at
a library that is not the volume owner will still appear out of order,
but at least this moves us closer to the goal.

Said bug is at https://bugs.launchpad.net/evergreen/+bug/903015 

As for implementing the "show copies that are held by the preferred
location first" logic, a simplistic approach would be to have the
Template Toolkit layer check for available copies in the holdings_xml
via a specific XPath request and then bubble those to the top - but that
won't work for sites with lots of copies and a wide search range,
because we'll hit problems with paging. So a better route might me to
use a windowing function in unapi.holdings_xml to rank the results based
on whether the owning library matches the preferred location, and then
order by rank, library name, and call number label.

Also, for identifying the preferred location, I propose "ploc" to
complement the "loc" CGI param. Then, with the work that Rick Scott is
currently doing towards adopting mkurl() consistently, we'll get the
persistence of that setting for free.


More information about the Open-ils-general mailing list