Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101277389
PhabricatorSearchIndexer.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Feb 7, 10:20
Size
809 B
Mime Type
text/x-php
Expires
Sun, Feb 9, 10:20 (2 d)
Engine
blob
Format
Raw Data
Handle
24129000
Attached To
rPH Phabricator
PhabricatorSearchIndexer.php
View Options
<?php
final
class
PhabricatorSearchIndexer
{
public
function
queueDocumentForIndexing
(
$phid
)
{
PhabricatorWorker
::
scheduleTask
(
'PhabricatorSearchWorker'
,
array
(
'documentPHID'
=>
$phid
,
));
}
public
function
indexDocumentByPHID
(
$phid
)
{
$doc_indexer_symbols
=
id
(
new
PhutilSymbolLoader
())
->
setAncestorClass
(
'PhabricatorSearchDocumentIndexer'
)
->
setConcreteOnly
(
true
)
->
setType
(
'class'
)
->
selectAndLoadSymbols
();
$indexers
=
array
();
foreach
(
$doc_indexer_symbols
as
$symbol
)
{
$indexers
[]
=
newv
(
$symbol
[
'name'
],
array
());
}
foreach
(
$indexers
as
$indexer
)
{
if
(
$indexer
->
shouldIndexDocumentByPHID
(
$phid
))
{
$indexer
->
indexDocumentByPHID
(
$phid
);
break
;
}
}
return
$this
;
}
}
Event Timeline
Log In to Comment