LP#1321017: Order constituent records by quality
authorMike Rylander <mrylander@gmail.com>
Tue, 20 May 2014 14:37:30 +0000 (10:37 -0400)
committerDan Wells <dbw2@calvin.edu>
Wed, 28 May 2014 18:13:30 +0000 (14:13 -0400)
commit17d9722773030996fd344e3ff2100fe7ee143f13
treea9f5b00cf866c164d6dbe8ac80a075239ecd0bdb
parentb60043b42f74530e5f6c6f62c4f84aa37f4f3191
LP#1321017: Order constituent records by quality

Previously, in some cases (often needlessly) we ordered constituent
records within a metarecord by a combination of type/form/blvl.  This
is not only of little use, but also expensive.  Instead, order them
by the bib's calculated quality, which takes type/form/blvl into account
already.

Also, use the new metabib.record_sorter to find the title tie-breaker
instead of using the view-of-a-view-of-a-view mrd compatability shim.

The net result is several orders of magnitude speed increase for
constituent record retrieval.  In particular, this resolves a problem
where doing a SIP2 patron information lookup and requesting a list
of holds could cause a timeout if the patron has one or more
metarecord holds.

This patch also causes the format filter parameter of the following
methods to be ignored:

open-ils.search.biblio.metarecord_to_records*
open-ils.search.biblio.metarecord.mods_slim.batch.retrieve*
open-ils.search.biblio.metarecord.mods_slim.retrieve*

Since the only use of the format filter was in JSPac code, and since
the record attributes mechanism has changed considerably, this removal
should be considered intentional.

Note that this patch includes a squash of a minor follow-up by Galen
Charlton to remove variables made unused by the original patch.

Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(for minor follow-up by Galen)
Signed-off-by: Dan Wells <dbw2@calvin.edu>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm