Page MenuHomePhorge

PhabricatorSearchIndexer.php
No OneTemporary

Size
764 B
Referenced Files
None
Subscribers
None

PhabricatorSearchIndexer.php

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

File Metadata

Mime Type
text/x-php
Expires
Tue, Jun 17, 2:06 AM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
221106
Default Alt Text
PhabricatorSearchIndexer.php (764 B)

Event Timeline