mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 12:30:56 +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:
parent
a1561a4d3a
commit
600a3e3b7c
1 changed files with 4 additions and 0 deletions
|
@ -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())
|
||||
|
|
Loading…
Reference in a new issue