get(); // update statistics table foreach ($datasets as $dataset) { $datasetId = $dataset->id; // $time = new \Illuminate\Support\Carbon(); // $dataset->server_date_modified = $time; // $dataset->save(); // Log::debug(__METHOD__ . ': ' . 'Adding index job for dataset ' . $datasetId . '.'); try { // Opus_Search_Service::selectIndexingService('onDocumentChange') $service = new SolariumAdapter("solr", config('solarium')); $service->addDatasetsToIndex($dataset); } catch (Exception $e) { $this->error(__METHOD__ . ': ' . 'Indexing document ' . $dataset->id . ' failed: ' . $e->getMessage()); } } return 0; } }