You are here

protected function SearchApiSolrAcquiaConnector::setReadOnlyMode in Acquia Connector 8

Sets read-only mode to the given Solr config.

We enforce read-only mode in 2 ways:

  • The module implements hook_search_api_index_load() and alters indexes'

read-only flag.

  • In this plugin, we "emulate" read-only mode by overriding

$this->getUpdateQuery() and avoiding all updates just in case something is still attempting to directly call a Solr update.

Parameters

array $configuration: Solr connection configuration.

Return value

array Updated Solr connection configuration.

1 call to SearchApiSolrAcquiaConnector::setReadOnlyMode()
SearchApiSolrAcquiaConnector::defaultConfiguration in acquia_search/src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php

File

acquia_search/src/Plugin/SolrConnector/SearchApiSolrAcquiaConnector.php, line 145

Class

SearchApiSolrAcquiaConnector
Acquia Search Plugin for Search API Solr.

Namespace

Drupal\acquia_search\Plugin\SolrConnector

Code

protected function setReadOnlyMode(array $configuration) {
  $configuration['overridden_by_acquia_search'] = ACQUIA_SEARCH_AUTO_OVERRIDE_READ_ONLY;
  return $configuration;
}