1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00
phorge-phorge/scripts
epriestley f6b1964740 Improve Search architecture
Summary:
The search indexing API has several problems right now:

  - Always runs in-process.
    - It would be nice to push this into the task queue for performance. However, the API currently passses an object all the way through (and some indexers depend on preloaded object attributes), so it can't be dumped into the task queue at any stage since we can't serialize it.
    - Being able to use the task queue will also make rebuilding indexes faster.
    - Instead, make the API phid-oriented.
  - No uniform indexing API.
    - Each "Editor" currently calls SomeCustomIndexer::indexThing(). This won't work with AbstractTransactions. The API is also just weird.
    - Instead, provide a uniform API.
  - No uniform CLI.
    - We have `scripts/search/reindex_everything.php`, but it doesn't actually index everything. Each new document type needs to be separately added to it, leading to stuff like D3839. Third-party applications can't provide indexers.
    - Instead, let indexers expose documents for indexing.
  - Not application-oriented.
    - All the indexers live in search/ right now, which isn't the right organization in an application-orietned view of the world.
    - Instead, move indexers to applications and load them with SymbolLoader.

Test Plan:
  - `bin/search index`
    - Indexed one revision, one task.
    - Indexed `--type TASK`, `--type DREV`, etc., for all types.
    - Indexed `--all`.
  - Added the word "saboteur" to a revision, task, wiki page, and question and then searched for it.
    - Creating users is a pain; searched for a user after indexing.
    - Creating commits is a pain; searched for a commit after indexing.
    - Mocks aren't currently loadable in the result view, so their indexing is moot.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: 20after4, aran

Maniphest Tasks: T1991, T2104

Differential Revision: https://secure.phabricator.com/D4261
2012-12-21 14:21:31 -08:00
..
aphront Delete license headers from files 2012-11-05 11:16:51 -08:00
calendar Delete license headers from files 2012-11-05 11:16:51 -08:00
celerity Use application icons for "Eye" menu and Crumbs 2012-12-07 13:37:28 -08:00
daemon Delete license headers from files 2012-11-05 11:16:51 -08:00
differential Delete license headers from files 2012-11-05 11:16:51 -08:00
drydock Allow leases to be explicitly released via web or CLI 2012-12-14 15:42:58 -08:00
fact Delete license headers from files 2012-11-05 11:16:51 -08:00
files Delete license headers from files 2012-11-05 11:16:51 -08:00
fpm Delete license headers from files 2012-11-05 11:16:51 -08:00
install Fix the RHEL install script, mostly for RHEL 5. 2012-11-27 12:52:37 -08:00
mail Delete license headers from files 2012-11-05 11:16:51 -08:00
profile Delete license headers from files 2012-11-05 11:16:51 -08:00
repository Add HarbormasterRunnerWorker, for running CI tests 2012-12-17 13:43:26 -08:00
search Improve Search architecture 2012-12-21 14:21:31 -08:00
setup Delete license headers from files 2012-11-05 11:16:51 -08:00
sql Delete license headers from files 2012-11-05 11:16:51 -08:00
ssh Fix various issues with SSH receivers 2012-12-19 11:11:32 -08:00
symbols Delete license headers from files 2012-11-05 11:16:51 -08:00
user Delete license headers from files 2012-11-05 11:16:51 -08:00
util Delete license headers from files 2012-11-05 11:16:51 -08:00
__init_script__.php Delete license headers from files 2012-11-05 11:16:51 -08:00
celerity_mapper.php Modernize file uploads 2012-12-16 16:34:01 -08:00