Skip to content

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.rb support multiple values for project_ids, example: ?project_ids=1,2,3 and ?project_ids=1
  • for backwards compatibility, we will keep project_id for input sent from a single select drop down UI component, the project_id params= may be deprecated and removed in future MRs
  • ee/lib/gitlab/elastic/project_search_results.rb and ee/lib/gitlab/elastic/search_results.rb are 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_ids to the logging used in the search_controller.rb method append_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