Use blobs as default scope in project search context
What does this MR do and why?
Related to #391808 (closed)
- allow no
scope
param forsearch/aggregations
endpoint (this now works likesearch
andsearch/count
endpoints) and will pull in scope from search_service methods inproject_service.rb
andglobal_service.rb
. This effectively defaults searches with no scope param defined for project searches =>blobs
and group/global searches =>projects
- update specs
- use
active
field to determine which tab is active (this comes from the backend)
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
- make sure gdk is enabled for elasticsearch and advanced search is enabled (code language filter only works for advanced search)
- Enable the Advanced Search
http://gdk:3000/admin/application_settings/advanced_search
- make sure the feature flag is enabled
echo 'Feature.enable(:search_blobs_language_aggregation)' | rails c
- perform a search from within a project at the top left nav search bar
- verify that code is the default tab in the results
- verify that the language filter shows up
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Terri Chu