Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F936902
PhabricatorSearchIndexer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
764 B
Referenced Files
None
Subscribers
None
PhabricatorSearchIndexer.php
View Options
<?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
Details
Attached
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)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment