public function SearchApiSolrBackend::setConfiguration in Search API Solr 8.3
Same name and namespace in other branches
- 8 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::setConfiguration()
- 8.2 src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::setConfiguration()
- 4.x src/Plugin/search_api/backend/SearchApiSolrBackend.php \Drupal\search_api_solr\Plugin\search_api\backend\SearchApiSolrBackend::setConfiguration()
Sets the configuration for this plugin instance.
Parameters
array $configuration: An associative array containing the plugin's configuration.
Overrides BackendPluginBase::setConfiguration
File
- src/
Plugin/ search_api/ backend/ SearchApiSolrBackend.php, line 250
Class
- SearchApiSolrBackend
- Apache Solr backend for search api.
Namespace
Drupal\search_api_solr\Plugin\search_api\backendCode
public function setConfiguration(array $configuration) {
$configuration['retrieve_data'] = (bool) $configuration['retrieve_data'];
$configuration['highlight_data'] = (bool) $configuration['highlight_data'];
$configuration['skip_schema_check'] = (bool) $configuration['skip_schema_check'];
$configuration['site_hash'] = (bool) $configuration['site_hash'];
$configuration['optimize'] = (bool) $configuration['optimize'];
$configuration['rows'] = (int) ($configuration['rows'] ?? 10);
parent::setConfiguration($configuration);
// Update the configuration of the Solr connector as well by replacing it by
// a new instance with the latest configuration.
$this->solrConnector = NULL;
}