Bring advanced search facets to parity with filtered views
## Problem to solve
Currently, Advanced search is significantly behind the filtered views for issues, merge requests, and epics. This prevents us from powering those searches via Elasticsearch, which would provide superior results and better performance; it would also allow us to migrate some nontrivial load off of the primary database, as the filtered queries can be expensive and currently cause frequent `500` errors.
## Proposal
* Support all the filters currently supported in issues, merge requests, and epics filtered views
* Index any new data required for each data type
* Migrate the filtered views to use Elasticsearch (but put it behind a flag that checks for elasticsearch being enabled so self-managed users aren't impacted)
## Iteration plan
We'll iteratively implement filters for merge requests and issues, starting with merge requests, since that's where the biggest opportunity is in terms of reducing load on our primary Postgres database. Specific filter usage is not currently tracked, so we weren't able to prioritize filters based on data. Instead, we're going by input from the Plan and Create teams.
### Merge requests
<table>
<tr>
<th align="center">Iteration</th>
<th>Description</th>
</tr>
<tr>
<td align="center">
**17.3**
</td>
<td>
* :construction: https://gitlab.com/groups/gitlab-org/-/epics/13315+
* :construction: https://gitlab.com/groups/gitlab-org/-/epics/13933+
* :construction: https://gitlab.com/groups/gitlab-org/-/epics/13968+
* :construction: https://gitlab.com/groups/gitlab-org/-/epics/13969+
</td>
</tr>
<tr>
<td align="center">
**17.4**
</td>
<td>
* :construction: https://gitlab.com/groups/gitlab-org/-/epics/13316+
* :construction: https://gitlab.com/groups/gitlab-org/-/epics/13938+
</td>
</tr>
<tr>
<td align="center">
**17.5**
</td>
<td>
*
</td>
</tr>
<tr>
<td align="center">
**17.6**
</td>
<td>
</td>
</tr>
</table>
epic