mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Reduce number of terms injected for host lexeme.
We do prefix matching in search so there is no need to inject the extra terms. Before: ``` "'discourse':10,11 'discourse.org':10,11 'org':10,11 'test':8A,10,11 'test.discourse.org':10,11 'titl':4A 'uncategor':9B" ``` After: ``` "'discourse.org':10,11 'org':10,11 'test':8A 'test.discourse.org':10,11 'titl':4A 'uncategor':9B" ```
This commit is contained in:
@@ -65,7 +65,7 @@ class SearchIndexer
|
||||
break if count >= 10 # Safeguard here to prevent infinite loop when a term has many dots
|
||||
term, _, remaining = lexeme.partition(".")
|
||||
break if remaining.blank?
|
||||
array << "'#{term}':#{positions} '#{remaining}':#{positions}"
|
||||
array << "'#{remaining}':#{positions}"
|
||||
lexeme = remaining
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user