From d7dae40bed0bcc708c117e6b9736d9587e13e56f Mon Sep 17 00:00:00 2001 From: Carsten Radeck Date: Thu, 1 Feb 2024 13:02:15 +0100 Subject: [PATCH] introduce setting "testConnection" that allows to disable initial ping requests --- Classes/Service/SolrServiceProvider.php | 4 +++- README.md | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Classes/Service/SolrServiceProvider.php b/Classes/Service/SolrServiceProvider.php index 75c52a17..2d924402 100644 --- a/Classes/Service/SolrServiceProvider.php +++ b/Classes/Service/SolrServiceProvider.php @@ -96,7 +96,9 @@ public function connect() $client = new Client($adapter, $eventDispatcher, $connectionSettings); $this->setConnection($client); - $this->testConnection(); + if (filter_var($this->settings["testConnection"]??true, FILTER_VALIDATE_BOOLEAN)) { + $this->testConnection(); + } $this->timeTracker= GeneralUtility::makeInstance(TimeTracker::class); $this->timing['INIT_START'] = $this->timeTracker->getDifferenceToStarttime(); diff --git a/README.md b/README.md index 3387ba40..091f2391 100644 --- a/README.md +++ b/README.md @@ -152,6 +152,10 @@ provider and an options array. The `plugin.tx_find.settings.activeConnection` determines the currently used connection. The default value is `default`. +Per default, the connection is tested upon initialization (ping request). +Using the boolean setting `plugin.tx_find.settings.testConnection` this behavior +can be disabled. + The `options` settings array in a connection definition is used to configure access to the Solr index. It contains: