summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/search_results.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/gitlab/search_results.rb b/lib/gitlab/search_results.rb
index 5ce3eda2ccb..f2795c739f5 100644
--- a/lib/gitlab/search_results.rb
+++ b/lib/gitlab/search_results.rb
@@ -25,6 +25,12 @@ module Gitlab
def no_highlighting?
false
end
+
+ # Since search results often contain many items,
+ # not triggering lookup can avoid n+1 queries.
+ def language_from_gitattributes
+ nil
+ end
end
attr_reader :current_user, :query, :per_page