protected function SearchApiSolrAcquiaConnector::setPreferredCore in Acquia Search 2.x
Same name and namespace in other branches
- 3.x src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php \Drupal\acquia_search\Plugin\SolrConnector\SearchApiSolrAcquiaConnector::setPreferredCore()
Sets the preferred core in the given Solr config.
Parameters
array $configuration: Solr connection configuration.
\Drupal\acquia_search\PreferredSearchCoreService $preferred_core_service: Service for determining the preferred search core.
Return value
array Updated Solr connection configuration.
1 call to SearchApiSolrAcquiaConnector::setPreferredCore()
- SearchApiSolrAcquiaConnector::defaultConfiguration in src/
Plugin/ SolrConnector/ SearchApiSolrAcquiaConnector.php - Gets default configuration for this plugin.
File
- src/
Plugin/ SolrConnector/ SearchApiSolrAcquiaConnector.php, line 103
Class
- SearchApiSolrAcquiaConnector
- Acquia Search Plugin for Search API Solr.
Namespace
Drupal\acquia_search\Plugin\SolrConnectorCode
protected function setPreferredCore(array $configuration, PreferredSearchCoreService $preferred_core_service) {
$configuration['host'] = $preferred_core_service
->getPreferredCoreHostname();
$configuration['core'] = $preferred_core_service
->getPreferredCoreId();
$configuration['index_id'] = $preferred_core_service
->getPreferredCoreId();
$configuration['overridden_by_acquia_search'] = ACQUIA_SEARCH_OVERRIDE_AUTO_SET;
return $configuration;
}