Advanced Search support multi-project search
Advanced Search should add multi project search support behind a feature flag. Multi project search will return results for Advanced Search results only.
Proposed plan
backend work
-
add a feature flag (gated by user) -
search_controller.rbsupport multiple values for project_ids, example:?project_ids=1,2,3and?project_ids=1 -
for backwards compatibility, we will keep project_idfor input sent from a single select drop down UI component, theproject_idparams= may be deprecated and removed in future MRs -
ee/lib/gitlab/elastic/project_search_results.rbandee/lib/gitlab/elastic/search_results.rbare the two files in play for the elasticsearch backed queries- support any current permission checks (example: Ability.allowed?)
- support an array of projects vs. a singular project for each scope
- code/blobs
- issues
- merge requests
- commits
- comments/notes
- milestones
- users - this one may be difficult as it is backed by Postgres
-
add project_idsto the logging used in thesearch_controller.rbmethodappend_info_to_payload
frontend work
-
create an EE component to support multi select for project select -
pass whether Elasticsearch is enabled to the frontend to determine which component is used
Note: the new component will need to be kept in sync with the CE version, but we don't make changes to those components too often so it should be ok
Once frontend work
Edited by Terri Chu