setDocumentTitle($book->getTitle()); $document->addField( PhabricatorSearchDocumentFieldType::FIELD_BODY, $book->getPreface()); $document->addRelationship( PhabricatorSearchRelationship::RELATIONSHIP_REPOSITORY, $book->getRepositoryPHID(), PhabricatorRepositoryRepositoryPHIDType::TYPECONST, $book->getDateCreated()); } }