summaryrefslogtreecommitdiff
path: root/lib/gitlab
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2019-09-09 13:46:24 +0000
committerStan Hu <stanhu@gmail.com>2019-09-09 13:46:24 +0000
commit107ebb8251463cef43b6ccf00dde4de54d66d1ac (patch)
treed6689133b1bd0129a4f5461d6d2154506caa2808 /lib/gitlab
parentcbb35ea882cdc40c09f7f6cd44bca8d72e506092 (diff)
downloadgitlab-ce-107ebb8251463cef43b6ccf00dde4de54d66d1ac.tar.gz
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')
-rw-r--r--lib/gitlab/search_results.rb5
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