HomePhabricator

Begin modularizing fields in SearchEngines

Description

Begin modularizing fields in SearchEngines

Summary:
Ref T8441. Ref T7715. Add a layer of indirection to fields in search engines. This will allow us to:

  • Simplify SearchEngine code, which has collected a lot of duplication around expressing what is effectively field types.
  • Automatically add fields like "Spaces" and "Projects" (primary driver for T8441).
  • Reorder or hide fields (not sure if we really want to do this, but it seems plausible, and this will let us play around with it, at least).
  • Drive Conduit Query methods via SearchEngines, so the same code specifies both the search UI and the application.query endpoint (primary driver in T7715).

Test Plan:

  • Searched for stuff in Paste, everything behaved exaclty like it used to (except that I removed the "no language" checkbox, which seemed like fluff from a bygone era).
  • Searched for stuff in other applications, saw no changes.
  • Hit date field errors.
  • Used query strings to specify values.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7715, T8441

Differential Revision: https://secure.phabricator.com/D13169