Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F115314652
PhabricatorSearchPhrictionIndexer.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
Sat, May 31, 03:21
Size
990 B
Mime Type
text/x-php
Expires
Mon, Jun 2, 03:21 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
26483242
Attached To
rPH Phabricator
PhabricatorSearchPhrictionIndexer.php
View Options
<?php
/**
* @group search
*/
final
class
PhabricatorSearchPhrictionIndexer
extends
PhabricatorSearchDocumentIndexer
{
public
static
function
indexDocument
(
PhrictionDocument
$document
)
{
$content
=
$document
->
getContent
();
$doc
=
new
PhabricatorSearchAbstractDocument
();
$doc
->
setPHID
(
$document
->
getPHID
());
$doc
->
setDocumentType
(
PhabricatorPHIDConstants
::
PHID_TYPE_WIKI
);
$doc
->
setDocumentTitle
(
$content
->
getTitle
());
// TODO: This isn't precisely correct, denormalize into the Document table?
$doc
->
setDocumentCreated
(
$content
->
getDateCreated
());
$doc
->
setDocumentModified
(
$content
->
getDateModified
());
$doc
->
addField
(
PhabricatorSearchField
::
FIELD_BODY
,
$content
->
getContent
());
$doc
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_AUTHOR
,
$content
->
getAuthorPHID
(),
PhabricatorPHIDConstants
::
PHID_TYPE_USER
,
$content
->
getDateCreated
());
self
::
reindexAbstractDocument
(
$doc
);
}
}
Event Timeline
Log In to Comment