diff --git a/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php b/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php index ecdd4d6e64..f7ecf57ba6 100644 --- a/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php +++ b/src/applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php @@ -66,27 +66,10 @@ final class PhabricatorRepositoryCommitSearchIndexer PhabricatorRepositoryRepositoryPHIDType::TYPECONST, $date_created); - $comments = PhabricatorAuditComment::loadComments( - $this->getViewer(), - $commit->getPHID()); - foreach ($comments as $comment) { - if (strlen($comment->getContent())) { - $doc->addField( - PhabricatorSearchField::FIELD_COMMENT, - $comment->getContent()); - } - } - - $inlines = PhabricatorAuditInlineComment::loadPublishedComments( - $this->getViewer(), - $commit->getPHID()); - foreach ($inlines as $inline) { - if (strlen($inline->getContent())) { - $doc->addField( - PhabricatorSearchField::FIELD_COMMENT, - $inline->getContent()); - } - } + $this->indexTransactions( + $doc, + new PhabricatorAuditTransactionQuery(), + array($commit->getPHID())); return $doc; } diff --git a/src/applications/search/index/PhabricatorSearchDocumentIndexer.php b/src/applications/search/index/PhabricatorSearchDocumentIndexer.php index 1758f05416..fbecdc8213 100644 --- a/src/applications/search/index/PhabricatorSearchDocumentIndexer.php +++ b/src/applications/search/index/PhabricatorSearchDocumentIndexer.php @@ -101,7 +101,6 @@ abstract class PhabricatorSearchDocumentIndexer { $xactions = id(clone $query) ->setViewer($this->getViewer()) ->withObjectPHIDs($phids) - ->withTransactionTypes(array(PhabricatorTransactions::TYPE_COMMENT)) ->execute(); foreach ($xactions as $xaction) {