diff --git a/module/finc/src/finc/Service/MungerInjectionDelegatorFactory.php b/module/finc/src/finc/Service/MungerInjectionDelegatorFactory.php index ff739670b13c3642d241108d1a7d4c9e91651770..b7a79a099fd3445228c44e88f668a77086fd883c 100644 --- a/module/finc/src/finc/Service/MungerInjectionDelegatorFactory.php +++ b/module/finc/src/finc/Service/MungerInjectionDelegatorFactory.php @@ -60,11 +60,6 @@ class MungerInjectionDelegatorFactory implements DelegatorFactoryInterface */ protected $preMungerConfig; - /** - * @var array shard configuration to register in all queries - */ - protected $shards_to_register; - /** * @var array search types to be excluded from lucene query syntax detection */ @@ -103,14 +98,6 @@ class MungerInjectionDelegatorFactory implements DelegatorFactoryInterface } ); } - $shards = $searchConfig->IndexShards->toArray(); - if ($excludedShards = $searchConfig->ShardPreferences->on_user_search_only ?? null) { - $shards = array_diff_key($shards, array_flip(explode(',', $excludedShards))); - } - if (!empty($shards)) { - $this->shards_to_register = $shards; - $e->attach('VuFindSearch', 'pre', [$this, 'registerShards']); - } if (isset($searchConfig->General->override_advanced_lucene_detection)) { $this->override_advanced_lucene_detection = array_flip($searchConfig->General->override_advanced_lucene_detection->toArray()); if (!empty($this->override_advanced_lucene_detection)) { @@ -176,22 +163,6 @@ class MungerInjectionDelegatorFactory implements DelegatorFactoryInterface return true; } - /** - * Event Listener on Search/Pre that registers all configured shards for every - * search request - * - * @param EventInterface $event - * - * @return void - */ - public function registerShards(EventInterface $event) - { - $params = $event->getParam('params'); - if (empty($params->get('shards'))) { - $params->set('shards', implode(',', $this->shards_to_register)); - } - } - public function overrideLuceneSyntaxHelper(EventInterface $event) { $params = $event->getParams();