diff options
author | Mario de la Ossa <mariodelaossa@gmail.com> | 2019-06-12 18:08:44 -0600 |
---|---|---|
committer | Mario de la Ossa <mariodelaossa@gmail.com> | 2019-07-04 10:56:13 -0600 |
commit | 4f04c4c90b2db8ddcf5f3e28a9bbefd20c8bbda0 (patch) | |
tree | b71cc9aca9c6a59a77281c4ec80e4c260b2c0b86 /app/models/concerns/issuable.rb | |
parent | 62e52ac6a8130c080f498ee2f76ef50b8c209f0f (diff) | |
download | gitlab-ce-4f04c4c90b2db8ddcf5f3e28a9bbefd20c8bbda0.tar.gz |
Ignore min_chars_for_partial_matching unles trigrm40379-CJK-search-min-chars
If we're not using a trigram index, then ignore the
min_chars_for_partial_matching setting
Diffstat (limited to 'app/models/concerns/issuable.rb')
-rw-r--r-- | app/models/concerns/issuable.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb index 299e413321d..952de92cae1 100644 --- a/app/models/concerns/issuable.rb +++ b/app/models/concerns/issuable.rb @@ -168,7 +168,7 @@ module Issuable # matched_columns - Modify the scope of the query. 'title', 'description' or joining them with a comma. # # Returns an ActiveRecord::Relation. - def full_search(query, matched_columns: 'title,description') + def full_search(query, matched_columns: 'title,description', use_minimum_char_limit: true) allowed_columns = [:title, :description] matched_columns = matched_columns.to_s.split(',').map(&:to_sym) matched_columns &= allowed_columns @@ -176,7 +176,7 @@ module Issuable # Matching title or description if the matched_columns did not contain any allowed columns. matched_columns = [:title, :description] if matched_columns.empty? - fuzzy_search(query, matched_columns) + fuzzy_search(query, matched_columns, use_minimum_char_limit: use_minimum_char_limit) end def simple_sorts |