mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-12-11 16:21:24 -05:00
FIX: Search in non-english should have a smaller minimum
This commit is contained in:
parent
fd3a8583dd
commit
cc366d5a60
2 changed files with 3 additions and 1 deletions
|
@ -178,7 +178,7 @@ class Search
|
|||
@valid = false
|
||||
return
|
||||
end
|
||||
@term = terms.join(' ')
|
||||
@term = terms.join(' ') if @term.include?(' ')
|
||||
end
|
||||
|
||||
# If the term is a number or url to a topic, just include that topic
|
||||
|
|
|
@ -413,6 +413,7 @@ describe Search do
|
|||
skip("skipped until pg app installs the db correctly") if RbConfig::CONFIG["arch"] =~ /darwin/
|
||||
|
||||
SiteSetting.default_locale = 'zh_TW'
|
||||
SiteSetting.min_search_term_length = 1
|
||||
topic = Fabricate(:topic, title: 'My Title Discourse社區指南')
|
||||
post = Fabricate(:post, topic: topic)
|
||||
|
||||
|
@ -424,6 +425,7 @@ describe Search do
|
|||
skip("skipped until pg app installs the db correctly") if RbConfig::CONFIG["arch"] =~ /darwin/
|
||||
|
||||
SiteSetting.search_tokenize_chinese_japanese_korean = true
|
||||
SiteSetting.min_search_term_length = 1
|
||||
|
||||
topic = Fabricate(:topic, title: 'My Title Discourse社區指南')
|
||||
post = Fabricate(:post, topic: topic)
|
||||
|
|
Loading…
Reference in a new issue