Commit a43a38039476598fe1e959b29d7033a5b1b1c8d0
1 parent
b58eeeaf
Exists in
master
and in
4 other branches
Increase amount of search results for issues, mr, projects
Showing
3 changed files
with
3 additions
and
5 deletions
Show diff stats
app/contexts/search_context.rb
| ... | ... | @@ -11,7 +11,7 @@ class SearchContext |
| 11 | 11 | return result unless query.present? |
| 12 | 12 | |
| 13 | 13 | projects = Project.where(id: project_ids) |
| 14 | - result[:projects] = projects.search(query).limit(10) | |
| 14 | + result[:projects] = projects.search(query).limit(20) | |
| 15 | 15 | |
| 16 | 16 | # Search inside singe project |
| 17 | 17 | project = projects.first if projects.length == 1 |
| ... | ... | @@ -19,8 +19,8 @@ class SearchContext |
| 19 | 19 | if params[:search_code].present? |
| 20 | 20 | result[:blobs] = project.repository.search_files(query, params[:repository_ref]) unless project.empty_repo? |
| 21 | 21 | else |
| 22 | - result[:merge_requests] = MergeRequest.where(project_id: project_ids).search(query).limit(10) | |
| 23 | - result[:issues] = Issue.where(project_id: project_ids).search(query).limit(10) | |
| 22 | + result[:merge_requests] = MergeRequest.where(project_id: project_ids).search(query).limit(20) | |
| 23 | + result[:issues] = Issue.where(project_id: project_ids).search(query).limit(20) | |
| 24 | 24 | result[:wiki_pages] = [] |
| 25 | 25 | end |
| 26 | 26 | result | ... | ... |
app/views/shared/_issues.html.haml
app/views/shared/_merge_requests.html.haml