You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: search_results.rb
    path of file: ./repos/gitlabhq/lib/gitlab
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Gitlab
  class SearchResults
    COUNT_LIMIT = 100
    COUNT_LIMIT_MESSAGE = "#{COUNT_LIM
    
    def issues(finder_params = {})
      issues = IssuesFinder.new(current_user, issuable_params.merge(finder_params)).execute
                 .preload(:work_item_type) # rubocop: disable CodeReuse/ActiveRecord -- preload for permission checks

      unless default_project_filter
        project_ids = project_ids_relation
        project_ids = project_ids.non_archived unless filters[:include_archived]

        issues = issues.in_projects(project_ids)
                       .allow_cross_joins_across_databases(url: 'https://gitlab.com/gitlab-org/gitlab/-/issues/420046')
      end