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:
authorSean McGivern <sean@mcgivern.me.uk>2017-11-29 12:10:43 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-11-29 12:10:43 +0300
commita4f8dddc212fcd91f6a4a09e92b2de6117a21305 (patch)
treeeed31a76289f865cdb1d392c6bad3f2bf96ebbc4 /app/finders
parent3659327d71a033703451baba01873d5663755739 (diff)
parentda42dfb3cf4a2fb0cdcc1a3b41438516a0bed0e5 (diff)
Merge branch 'dm-search-pattern' into 'master'
Use fuzzy search with minimum length of 3 characters where appropriate Closes #40512 See merge request gitlab-org/gitlab-ce!15592
Diffstat (limited to 'app/finders')
-rw-r--r--app/finders/notes_finder.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/finders/notes_finder.rb b/app/finders/notes_finder.rb
index 02eb983bf55..12157818bcd 100644
--- a/app/finders/notes_finder.rb
+++ b/app/finders/notes_finder.rb
@@ -104,8 +104,7 @@ class NotesFinder
query = @params[:search]
return notes unless query
- pattern = "%#{query}%"
- notes.where(Note.arel_table[:note].matches(pattern))
+ notes.search(query)
end
# Notes changed since last fetch