Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93567159
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
Fri, Nov 29, 19:27
Size
864 B
Mime Type
text/x-php
Expires
Sun, Dec 1, 19:27 (2 d)
Engine
blob
Format
Raw Data
Handle
22664637
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