1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

Only index documentable atoms for search

Summary: Ref T7458. Only index documentable atoms in the search index. In particular, this prevents files and methods from being returned in search results (clicking on these search results doesn't actually work anyway).

Test Plan: Actually, to get this to work I had to destroy the search index and recreate it... is this expected?

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T7458

Differential Revision: https://secure.phabricator.com/D13298
This commit is contained in:
Joshua Spence 2015-06-16 06:51:51 +10:00
parent a1561a4d3a
commit 600a3e3b7c

View file

@ -10,6 +10,10 @@ final class DivinerAtomSearchIndexer extends PhabricatorSearchDocumentIndexer {
$atom = $this->loadDocumentByPHID($phid);
$book = $atom->getBook();
if (!$atom->getIsDocumentable()) {
return null;
}
$doc = $this->newDocument($phid)
->setDocumentTitle($atom->getTitle())
->setDocumentCreated($book->getDateCreated())