Use search_files_by_regexp instead of search_files_by_name
requested to merge 382489-searchfilesbyname-errors-when-starting-with-a-dash-for-basic-search into master
What does this MR do and why?
This will use the search_files_by_regexp
instead of search_files_by_name
if the feature_flag code_basic_search_files_by_regexp
is turned on for the project. search_files_by_regexp
returns a better result. We can also make case insensitive search with search_files_by_regexp
Screenshots or screen recordings
How to set up and validate locally
- Start the local development environment.
gdk start
- In the rails console turn on the feature
Feature.enable :code_basic_search_files_by_regexp, Project.find(7)
You can choose any project in your local DB
-
Make sure the advanced search is disabled
-
Search for
adopters
under the project scope with project id 7 selected. You will see the resultADOPTERS.md
as well -
Now disable the feature
Feature.disable :code_basic_search_files_by_regexp, Project.find(7)
- Search for
adopters
under the project scope with project id 7 selected. You will not see the resultADOPTERS.md
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.
Related to #382489 (closed)
Edited by Ravi Kumar