3 final class PhabricatorPasteFulltextEngine
4 extends PhabricatorFulltextEngine
{
6 protected function buildAbstractDocument(
7 PhabricatorSearchAbstractDocument
$document,
10 $paste = id(new PhabricatorPasteQuery())
11 ->setViewer($this->getViewer())
12 ->withPHIDs(array($object->getPHID()))
16 $document->setDocumentTitle($paste->getTitle());
18 $document->addRelationship(
20 ? PhabricatorSearchRelationship
::RELATIONSHIP_CLOSED
21 : PhabricatorSearchRelationship
::RELATIONSHIP_OPEN
,
23 PhabricatorPastePastePHIDType
::TYPECONST
,
24 PhabricatorTime
::getNow());
27 PhabricatorSearchDocumentFieldType
::FIELD_BODY
,
28 $paste->getContent());
30 $document->addRelationship(
31 PhabricatorSearchRelationship
::RELATIONSHIP_AUTHOR
,
32 $paste->getAuthorPHID(),
33 PhabricatorPeopleUserPHIDType
::TYPECONST
,
34 $paste->getDateCreated());