diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-08 15:09:27 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-08 15:09:27 +0300 |
commit | 81f062b841f6062601662061850934a51e77ceea (patch) | |
tree | 0851038895c34776af8603f13b546b50df511e36 /app/models/issue.rb | |
parent | e40061efd4c68576da944254567d0b3fbc233ae4 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 6c0a4c1260a..5a078e13fb2 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -272,6 +272,16 @@ class Issue < ApplicationRecord def order_upvotes_asc reorder(upvotes_count: :asc) end + + override :full_search + def full_search(query, matched_columns: nil, use_minimum_char_limit: true) + return super if query.match?(IssuableFinder::FULL_TEXT_SEARCH_TERM_REGEX) + + super.where( + 'issues.title NOT SIMILAR TO :pattern OR issues.description NOT SIMILAR TO :pattern', + pattern: IssuableFinder::FULL_TEXT_SEARCH_TERM_PATTERN + ) + end end def self.participant_includes |