You are here

public function SearchApiSolrAdminCommands::reload in Search API Solr 4.x

Reload Solr core or collection.

@command search-api-solr:reload

@usage drush search-api-solr:reload server_id Forces the Solr server to reload the core or collection to apply config changes.

@aliases solr-reload

Parameters

string $server_id: The ID of the server.

Throws

\Drupal\search_api\SearchApiException

\Drupal\search_api_solr\SearchApiSolrException

File

modules/search_api_solr_admin/src/Commands/SearchApiSolrAdminCommands.php, line 68

Class

SearchApiSolrAdminCommands
Defines Drush commands for the Search API Solr Admin.

Namespace

Drupal\search_api_solr_admin\Commands

Code

public function reload(string $server_id) : void {
  $this->commandHelper
    ->reload($server_id);
  $this
    ->logger()
    ->success(dt('Solr core/collection of %server_id reloaded.', [
    '%server_id' => $server_id,
  ]));
}