mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: in:title search should only search through topic first posts.
This commit is contained in:
@@ -847,6 +847,7 @@ class Search
|
||||
# C is for tags
|
||||
# D is for cooked
|
||||
weights = @in_title ? 'A' : (SiteSetting.tagging_enabled ? 'ABCD' : 'ABD')
|
||||
posts = posts.where(post_number: 1) if @in_title
|
||||
posts = posts.where("post_search_data.search_data @@ #{ts_query(weight_filter: weights)}")
|
||||
exact_terms = @term.scan(Regexp.new(PHRASE_MATCH_REGEXP_PATTERN)).flatten
|
||||
|
||||
|
||||
Reference in New Issue
Block a user