Page MenuHomePhabricator

Only index documentable atoms for search
ClosedPublic

Authored by joshuaspence on Jun 15 2015, 12:02 PM.
Tags
None
Referenced Files
F14063152: D13298.diff
Mon, Nov 18, 4:51 PM
F14037935: D13298.diff
Sun, Nov 10, 8:17 PM
F14003382: D13298.id32162.diff
Sat, Oct 26, 5:39 AM
F13986880: D13298.id.diff
Oct 21 2024, 6:06 AM
F13982328: D13298.diff
Oct 19 2024, 10:25 PM
F13954856: D13298.id32180.diff
Oct 13 2024, 11:18 PM
Unknown Object (File)
Oct 9 2024, 2:08 AM
Unknown Object (File)
Sep 27 2024, 8:25 PM
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
Branch
master
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 6779
Build 6801: [Placeholder Plan] Wait for 30 Seconds

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.