Path: blob/master/src/applications/maniphest/search/ManiphestTaskFulltextEngine.php
12256 views
<?php12final class ManiphestTaskFulltextEngine3extends PhabricatorFulltextEngine {45protected function buildAbstractDocument(6PhabricatorSearchAbstractDocument $document,7$object) {89$task = $object;1011$document->setDocumentTitle($task->getTitle());1213$document->addField(14PhabricatorSearchDocumentFieldType::FIELD_BODY,15$task->getDescription());1617$document->addRelationship(18PhabricatorSearchRelationship::RELATIONSHIP_AUTHOR,19$task->getAuthorPHID(),20PhabricatorPeopleUserPHIDType::TYPECONST,21$task->getDateCreated());2223$document->addRelationship(24$task->isClosed()25? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED26: PhabricatorSearchRelationship::RELATIONSHIP_OPEN,27$task->getPHID(),28ManiphestTaskPHIDType::TYPECONST,29PhabricatorTime::getNow());3031$owner = $task->getOwnerPHID();32if ($owner) {33$document->addRelationship(34PhabricatorSearchRelationship::RELATIONSHIP_OWNER,35$owner,36PhabricatorPeopleUserPHIDType::TYPECONST,37time());38} else {39$document->addRelationship(40PhabricatorSearchRelationship::RELATIONSHIP_UNOWNED,41$task->getPHID(),42PhabricatorPHIDConstants::PHID_TYPE_VOID,43$task->getDateCreated());44}45}4647}484950