diff options
author | Francisco Javier López <fjlopez@gitlab.com> | 2019-09-09 16:46:24 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-09-09 16:46:24 +0300 |
commit | 107ebb8251463cef43b6ccf00dde4de54d66d1ac (patch) | |
tree | d6689133b1bd0129a4f5461d6d2154506caa2808 /lib/gitlab/search_results.rb | |
parent | cbb35ea882cdc40c09f7f6cd44bca8d72e506092 (diff) |
Lower searches count limit
Lowering the limit when performing search from 1001 to 101.
This will allow us to speed this process.
Diffstat (limited to 'lib/gitlab/search_results.rb')
-rw-r--r-- | lib/gitlab/search_results.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb index ce4c1611687..93e172299b9 100644 --- a/lib/gitlab/search_results.rb +++ b/lib/gitlab/search_results.rb @@ -2,7 +2,8 @@ module Gitlab class SearchResults - COUNT_LIMIT = 1001 + COUNT_LIMIT = 101 + COUNT_LIMIT_MESSAGE = "#{COUNT_LIMIT - 1}+" attr_reader :current_user, :query, :per_page @@ -60,7 +61,7 @@ module Gitlab def formatted_limited_count(count) if count >= COUNT_LIMIT - "#{COUNT_LIMIT - 1}+" + COUNT_LIMIT_MESSAGE else count.to_s end |