Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diviner/search/DivinerBookSearchIndexer.php
| Show All 12 Lines | $doc = $this->newDocument($phid) | ||||
| ->setDocumentTitle($book->getTitle()) | ->setDocumentTitle($book->getTitle()) | ||||
| ->setDocumentCreated($book->getDateCreated()) | ->setDocumentCreated($book->getDateCreated()) | ||||
| ->setDocumentModified($book->getDateModified()); | ->setDocumentModified($book->getDateModified()); | ||||
| $doc->addField( | $doc->addField( | ||||
| PhabricatorSearchDocumentFieldType::FIELD_BODY, | PhabricatorSearchDocumentFieldType::FIELD_BODY, | ||||
| $book->getPreface()); | $book->getPreface()); | ||||
| $doc->addRelationship( | |||||
| PhabricatorSearchRelationship::RELATIONSHIP_REPOSITORY, | |||||
| $book->getRepositoryPHID(), | |||||
| PhabricatorRepositoryRepositoryPHIDType::TYPECONST, | |||||
| $book->getDateCreated()); | |||||
| $this->indexTransactions( | $this->indexTransactions( | ||||
| $doc, | $doc, | ||||
| new DivinerLiveBookTransactionQuery(), | new DivinerLiveBookTransactionQuery(), | ||||
| array($phid)); | array($phid)); | ||||
| return $doc; | return $doc; | ||||
| } | } | ||||
| } | } | ||||