From: Bill Erickson Date: Wed, 5 Oct 2011 19:16:17 +0000 (-0400) Subject: Avoid collecting facet data for non-facet fields X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bc7fd8a578677c1ead5c536c52131abb0563c6a3;p=evergreen%2Ftadl.git Avoid collecting facet data for non-facet fields If a config.metabib_field (Admin -> Server Admin -> MARC Search/Facet Fields) starts out as a facet field but is later changed, data for that facet can still bubble up since it has already been extracted. This patch prevents facets for config.metabib_field entries whose facet_field=false from getting collected/cached for search results. Signed-off-by: Bill Erickson Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm index 2bc7062eeb..7deae9d48d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm @@ -1512,7 +1512,7 @@ sub cache_facets { }, where => { '+mmrsm' => { $count_field => $results }, - '+cmf' => { field_class => { 'not in' => $ignore } } + '+cmf' => { field_class => { 'not in' => $ignore }, facet_field => 't' } } } );