Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/search/DivinerAtomSearchIndexer.php
| Show All 24 Lines | protected function buildAbstractDocumentByPHID($phid) { | ||||
| $doc->addRelationship( | $doc->addRelationship( | ||||
| PhabricatorSearchRelationship::RELATIONSHIP_BOOK, | PhabricatorSearchRelationship::RELATIONSHIP_BOOK, | ||||
| $atom->getBookPHID(), | $atom->getBookPHID(), | ||||
| DivinerBookPHIDType::TYPECONST, | DivinerBookPHIDType::TYPECONST, | ||||
| PhabricatorTime::getNow()); | PhabricatorTime::getNow()); | ||||
| $doc->addRelationship( | $doc->addRelationship( | ||||
| PhabricatorSearchRelationship::RELATIONSHIP_REPOSITORY, | |||||
| $atom->getRepositoryPHID(), | |||||
| PhabricatorRepositoryRepositoryPHIDType::TYPECONST, | |||||
| PhabricatorTime::getNow()); | |||||
| $doc->addRelationship( | |||||
| $atom->getGraphHash() | $atom->getGraphHash() | ||||
| ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED | ? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED | ||||
| : PhabricatorSearchRelationship::RELATIONSHIP_OPEN, | : PhabricatorSearchRelationship::RELATIONSHIP_OPEN, | ||||
| $atom->getBookPHID(), | $atom->getBookPHID(), | ||||
| DivinerBookPHIDType::TYPECONST, | DivinerBookPHIDType::TYPECONST, | ||||
| PhabricatorTime::getNow()); | PhabricatorTime::getNow()); | ||||
| return $doc; | return $doc; | ||||
| } | } | ||||
| } | } | ||||