Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/project.rb')
-rw-r--r--app/models/project.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index e3e10d17cc0..14207c48f66 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -543,7 +543,11 @@ class Project < ApplicationRecord
#
# query - The search query as a String.
def search(query)
- fuzzy_search(query, [:path, :name, :description])
+ if Feature.enabled?(:project_search_by_full_path, default_enabled: true)
+ joins(:route).fuzzy_search(query, [Route.arel_table[:path], :name, :description])
+ else
+ fuzzy_search(query, [:path, :name, :description])
+ end
end
def search_by_title(query)