diff --git a/src/applications/search/index/indexer/differential/PhabricatorSearchDifferentialIndexer.php b/src/applications/search/index/indexer/differential/PhabricatorSearchDifferentialIndexer.php index 1d437a879d..1e3f6f878a 100644 --- a/src/applications/search/index/indexer/differential/PhabricatorSearchDifferentialIndexer.php +++ b/src/applications/search/index/indexer/differential/PhabricatorSearchDifferentialIndexer.php @@ -52,15 +52,18 @@ final class PhabricatorSearchDifferentialIndexer time()); } - $comments = id(new DifferentialInlineComment())->loadAllWhere( - 'revisionID = %d AND commentID is not null', + $comments = id(new DifferentialComment())->loadAllWhere( + 'revisionID = %d', + $rev->getID()); + + $inlines = id(new DifferentialInlineComment())->loadAllWhere( + 'revisionID = %d AND commentID IS NOT NULL', $rev->getID()); $touches = array(); - foreach ($comments as $comment) { + foreach (array_merge($comments, $inlines) as $comment) { if (strlen($comment->getContent())) { - // TODO: we should also index inline comments. $doc->addField( PhabricatorSearchField::FIELD_COMMENT, $comment->getContent()); diff --git a/src/applications/search/index/indexer/differential/__init__.php b/src/applications/search/index/indexer/differential/__init__.php index 3b9f6b4f04..0ef27bc34a 100644 --- a/src/applications/search/index/indexer/differential/__init__.php +++ b/src/applications/search/index/indexer/differential/__init__.php @@ -8,6 +8,7 @@ phutil_require_module('arcanist', 'differential/constants/revisionstatus'); +phutil_require_module('phabricator', 'applications/differential/storage/comment'); phutil_require_module('phabricator', 'applications/differential/storage/inlinecomment'); phutil_require_module('phabricator', 'applications/phid/constants'); phutil_require_module('phabricator', 'applications/phid/handle/data');