Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102338072
PhamePostFulltextEngine.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
Wed, Feb 19, 16:09
Size
865 B
Mime Type
text/x-php
Expires
Fri, Feb 21, 16:09 (2 d)
Engine
blob
Format
Raw Data
Handle
24330390
Attached To
rPH Phabricator
PhamePostFulltextEngine.php
View Options
<?php
final
class
PhamePostFulltextEngine
extends
PhabricatorFulltextEngine
{
protected
function
buildAbstractDocument
(
PhabricatorSearchAbstractDocument
$document
,
$object
)
{
$post
=
$object
;
$document
->
setDocumentTitle
(
$post
->
getTitle
());
$document
->
addField
(
PhabricatorSearchDocumentFieldType
::
FIELD_BODY
,
$post
->
getBody
());
$document
->
addRelationship
(
PhabricatorSearchRelationship
::
RELATIONSHIP_AUTHOR
,
$post
->
getBloggerPHID
(),
PhabricatorPeopleUserPHIDType
::
TYPECONST
,
$post
->
getDateCreated
());
$document
->
addRelationship
(
$post
->
isArchived
()
?
PhabricatorSearchRelationship
::
RELATIONSHIP_CLOSED
:
PhabricatorSearchRelationship
::
RELATIONSHIP_OPEN
,
$post
->
getPHID
(),
PhabricatorPhamePostPHIDType
::
TYPECONST
,
PhabricatorTime
::
getNow
());
}
}
Event Timeline
Log In to Comment