public function setup() {
$this->lastIndexedID = 0;
$service = singleton('SolrSearchService');
$service->getSolr()->deleteByQuery('ClassNameHierarchy_ms:' . $this->reindexType);
}
SolrReindexTask
foreach ($this->types as $type) {
$search->getSolr()->deleteByQuery('ClassNameHierarchy_ms:' . $type);
$search->getSolr()->commit();
if (ClassInfo::exists('QueuedJob') && !isset($_GET['direct'])) {
$job = new SolrReindexJob($type);
$svc = singleton('QueuedJobService');
$svc->queueJob($job);
$this->log("Reindexing job for $type has been queued");
} else {
$mode = Versioned::get_reading_mode();
Versioned::reading_stage('Stage');
// get the holders first, see if we have any that AREN'T in the root (ie we've already partitioned everything...)
$pages = $type::get();
$pages = $pages->filter(array('ClassName' => $type));
/* @var $search SolrSearchService */
$this->log("------------------------------");
$this->log("Start reindexing job for $type (Count: ".$pages->count()."):");
$this->log("------------------------------");
foreach ($pages as $page) {
SolrReindexTask just needs:
Moved to the non-QueuedJobs codepath.
SolrReindexJob
SolrReindexTask