A site setting for how many similar topics are returned
This commit is contained in:
parent
dab49c70bb
commit
96ac0c5569
|
@ -161,6 +161,8 @@ class SiteSetting < ActiveRecord::Base
|
|||
|
||||
client_setting(:educate_until_posts, 2)
|
||||
|
||||
setting(:max_similar_results, 7)
|
||||
|
||||
def self.call_discourse_hub?
|
||||
self.enforce_global_nicknames? && self.discourse_org_access_key.present?
|
||||
end
|
||||
|
|
|
@ -223,7 +223,7 @@ class Topic < ActiveRecord::Base
|
|||
.visible
|
||||
.where(closed: false, archived: false)
|
||||
.listable_topics
|
||||
.limit(5)
|
||||
.limit(SiteSetting.max_similar_results)
|
||||
.order('similarity desc')
|
||||
.all
|
||||
end
|
||||
|
|
|
@ -425,6 +425,7 @@ en:
|
|||
|
||||
category_colors: "A pipe (|) separated list of hexadecimal color values allowed for categories"
|
||||
max_upload_size_kb: "The maximum size of files we allow users to upload in kb - be sure to configure the limit in nginx (client_max_body_size) / apache or proxy as well."
|
||||
max_similar_results: "How many similar topics to show a user while they are composing a new topic"
|
||||
|
||||
notification_types:
|
||||
mentioned: "%{display_username} mentioned you in %{link}"
|
||||
|
|
Loading…
Reference in New Issue