public function SearchApiSolrAdminCommands::uploadConfigset in Search API Solr 4.x
Upload a configset and reload the collection or create it.
@command search-api-solr:upload-configset
@usage drush search-api-solr:upload-configset server_id num_shards Upload a configset and reload the collection or create it with num_shards.
@aliases solr-upload-conf
Parameters
string $server_id: The ID of the server.
string $num_shards: (optional) The number of shards in case a new collection will be created.
Throws
\Drupal\search_api\SearchApiException
\Drupal\search_api_solr\SearchApiSolrException
\ZipStream\Exception\FileNotFoundException
\ZipStream\Exception\FileNotReadableException
\ZipStream\Exception\OverflowException
File
- modules/search_api_solr_admin/ src/ Commands/ SearchApiSolrAdminCommands.php, line 115 
Class
- SearchApiSolrAdminCommands
- Defines Drush commands for the Search API Solr Admin.
Namespace
Drupal\search_api_solr_admin\CommandsCode
public function uploadConfigset(string $server_id, int $num_shards = 3) : void {
  $this->commandHelper
    ->uploadConfigset($server_id, $num_shards, $this
    ->output()
    ->isVerbose());
  $this
    ->logger()
    ->success(dt('Solr configset for %server_id uploaded.', [
    '%server_id' => $server_id,
  ]));
}