diff --git a/config/vufind/combined.ini b/config/vufind/combined.ini index 48625a997ba82d8e92ac615eefe94871dd613d39..f7eb945885940f6355782dc19125cb53ec830100 100644 --- a/config/vufind/combined.ini +++ b/config/vufind/combined.ini @@ -28,6 +28,8 @@ ; will be suppressed (default). ; filter = One or more filters to apply to search results displayed in the column. ; Use multiple "filter[] = ..." lines if multiple filters are needed. +; shard = Limit results to one or more shards (use names from searches.ini, not +; URLs). Use multiple "shard[] = ..." lines if multiple shards are needed. ; ; All display text is subject to translation and may be added to the language ; .ini files. diff --git a/module/VuFind/src/VuFind/Controller/CombinedController.php b/module/VuFind/src/VuFind/Controller/CombinedController.php index 7ff244878f783c10dba578013d7c39144449fa52..416ac5344501e547c45295c07810c52162c0b84b 100644 --- a/module/VuFind/src/VuFind/Controller/CombinedController.php +++ b/module/VuFind/src/VuFind/Controller/CombinedController.php @@ -265,6 +265,10 @@ class CombinedController extends AbstractSearch $query->filter = isset($settings['filter']) ? (array)$settings['filter'] : null; + // Apply shards, if any: + $query->shard = isset($settings['shard']) + ? (array)$settings['shard'] : null; + // Reset override to avoid bleed-over from one section to the next! $query->recommendOverride = false;