Source of file DeleteIndexTask.php
Size: 0,754 Bytes - Last Modified: 2021-12-23T10:58:34+00:00
/var/www/docs.ssmods.com/process/src/src/SilverStripe/Elastica/DeleteIndexTask.php
123456789101112131415161718192021222324252627282930313233343536 | <?php namespace SilverStripe\Elastica; /** * Defines and refreshes the elastic search index. */ class DeleteIndexTask extends \BuildTask { protected $title = 'Elastic Search Index Deletion'; protected $description = 'Deletes the configured elastic search index'; /** * @var ElasticaService */ private $service; public function __construct(ElasticaService $service) { $this->service = $service; } /** * Execute the task to delete the currently configured index. */ public function run($request) { $message = ElasticaUtil::getPrinter(); $this->service->define(); $this->service->reset(); $message('Successfully deleted configured index'); } } |