Use ApplicationTransactions/CustomField to power Differential global search

Summary:
Ref T2222. Ref T3886. Ref T418. A few changes:

  - CustomField can now index into global search.
  - Use CustomField fields instead of older custom fields for Differential global search. (This slightly breaks any custom fields which exist, but they are presumably very rare, and probably do not exist; this break is also very mild.)
  - Automatically perform CustomField and Subscribable indexing on applicable object types.

Test Plan: Used `bin/search index` to reindex a bunch of stuff, then searched for it. Debug-dumped abstract documents to inspect them.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T418, T3886, T2222

Differential Revision: https://secure.phabricator.com/D8346
This commit is contained in:
epriestley
2014-02-26 11:18:06 -08:00
parent bcf255e9c9
commit cd080b092e
10 changed files with 118 additions and 81 deletions

View File

@@ -17,9 +17,6 @@ final class PhabricatorProjectSearchIndexer
$doc->setDocumentCreated($project->getDateCreated());
$doc->setDocumentModified($project->getDateModified());
$this->indexSubscribers($doc);
$this->indexCustomFields($doc, $project);
$doc->addRelationship(
$project->isArchived()
? PhabricatorSearchRelationship::RELATIONSHIP_CLOSED