Page MenuHomec4science

PhabricatorSearchIndexer.php
No OneTemporary

File Metadata

Created
Sun, Dec 1, 20:54

PhabricatorSearchIndexer.php

<?php
final class PhabricatorSearchIndexer {
public function queueDocumentForIndexing($phid) {
PhabricatorWorker::scheduleTask(
'PhabricatorSearchWorker',
array(
'documentPHID' => $phid,
));
}
public function indexDocumentByPHID($phid) {
$indexers = id(new PhutilSymbolLoader())
->setAncestorClass('PhabricatorSearchDocumentIndexer')
->loadObjects();
foreach ($indexers as $indexer) {
if ($indexer->shouldIndexDocumentByPHID($phid)) {
$indexer->indexDocumentByPHID($phid);
break;
}
}
return $this;
}
}

Event Timeline