LP#1321017: Order constituent records by quality user/gmcharlt/lp1321017-fast-MR-constituent-retrieval-signed-off
authorMike Rylander <mrylander@gmail.com>
Tue, 20 May 2014 14:37:30 +0000 (10:37 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Wed, 21 May 2014 16:16:39 +0000 (09:16 -0700)
commit9eb6fd7e7eca3b728be276c7794f7bdadfaa830f
tree341261718f1dd9dee043b3814f5972869e064967
parente174630d6c666dcfe55d78147398978a9ad26295
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>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/metabib.pm