diff options
Diffstat (limited to 'app/finders/issues_finder.rb')
-rw-r--r-- | app/finders/issues_finder.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/finders/issues_finder.rb b/app/finders/issues_finder.rb index 9f96abcd4e5..e12dce744b5 100644 --- a/app/finders/issues_finder.rb +++ b/app/finders/issues_finder.rb @@ -29,6 +29,8 @@ # issue_types: array of strings (one of WorkItems::Type.base_types) # class IssuesFinder < IssuableFinder + extend ::Gitlab::Utils::Override + CONFIDENTIAL_ACCESS_LEVEL = Gitlab::Access::REPORTER def self.scalar_params @@ -96,6 +98,16 @@ class IssuesFinder < IssuableFinder by_negated_issue_types(issues) end + override :filter_by_full_text_search + def filter_by_full_text_search(items) + # This project condition is used as a hint to PG about the partitions that need searching + # because the search data is partitioned by project. + # In certain cases, like the recent items search, the query plan is much better without this condition. + return super if params[:skip_full_text_search_project_condition].present? + + super.with_projects_matching_search_data + end + def by_confidential(items) return items if params[:confidential].nil? |