diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-11-24 12:24:24 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-11-27 11:29:40 +0100 |
commit | da42dfb3cf4a2fb0cdcc1a3b41438516a0bed0e5 (patch) | |
tree | 1dc5014e27ce049e47e8670b83b79e0c49bb96b9 /app/models/ci | |
parent | d4eea275310867eccc927d0e92a1d19a165f0668 (diff) | |
download | gitlab-ce-da42dfb3cf4a2fb0cdcc1a3b41438516a0bed0e5.tar.gz |
Use fuzzy search with minimum length of 3 characters where appropriatedm-search-pattern
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/runner.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/models/ci/runner.rb b/app/models/ci/runner.rb index d91a66ab5c2..d39610a8995 100644 --- a/app/models/ci/runner.rb +++ b/app/models/ci/runner.rb @@ -60,10 +60,7 @@ module Ci # # Returns an ActiveRecord::Relation. def self.search(query) - t = arel_table - pattern = to_pattern(query) - - where(t[:token].matches(pattern).or(t[:description].matches(pattern))) + fuzzy_search(query, [:token, :description]) end def self.contact_time_deadline |