Page MenuHomePhabricator

Only index documentable atoms for search
ClosedPublic

Authored by joshuaspence on Jun 15 2015, 12:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 25, 2:46 AM
Unknown Object (File)
Fri, Apr 19, 7:23 PM
Unknown Object (File)
Thu, Apr 11, 10:02 AM
Unknown Object (File)
Tue, Apr 9, 5:54 AM
Unknown Object (File)
Thu, Apr 4, 8:22 PM
Unknown Object (File)
Mar 27 2024, 10:58 PM
Unknown Object (File)
Feb 14 2024, 11:32 AM
Unknown Object (File)
Feb 4 2024, 4:10 AM
Subscribers

Details

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?

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Only index documentable atoms for search.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.
epriestley edited edge metadata.

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?).

This revision is now accepted and ready to land.Jun 15 2015, 1:13 PM

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.

This revision was automatically updated to reflect the committed changes.