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).
Details
- Reviewers
epriestley - Group Reviewers
Blessed Reviewers - Maniphest Tasks
- T7458: Diviner should integrate with main search
- Commits
- Restricted Diffusion Commit
rP600a3e3b7c2d: Only index documentable atoms for search
Actually, to get this to work I had to destroy the search index and recreate it... is this expected?
Diff Detail
- Repository
- rP Phabricator
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Actually, to get this to work I had to destroy the search index and recreate it... is this expected?
Currently, yes: normally, objects only need to be removed from the search index if they're deleted. We can do this at display time since they'll just fail to load if they're deleted, and because we need to filter out results at display time anyway (to remove results the viewer can't see).
We could probably fix this by removing documents that fail to index/generate in the indexer, although it might be a bit of work (I think the "FulltextSearchEngineInterface" or whatever doesn't actually have 'remove' methods right now?).
I just woke up so I'm not sure that actually made sense. I just mean something like this:
$document = $this-> buildAbstractDocumentByPHID(...); + if (!$document) { + $this->removeEverythingAboutThisDocumentFromTheIndex(...); + }
...but writing removeEverythingAboutThisDocumentFromTheIndex() may not be trivial.