FEATURE: search within title using in:title

Also

- Significantly improved search ranking, title is treated most strongly
- Adds tag names to the index
- Run search re-indexer more aggressively
- Re-index topic and all posts on category change
This commit is contained in:
Sam
2018-02-20 14:41:00 +11:00
parent 73a492f721
commit 86d12bd44b
8 changed files with 187 additions and 110 deletions

View File

@@ -49,7 +49,7 @@ class UserSearch
if @term.present?
if SiteSetting.enable_names? && @term !~ /[_\.-]/
query = Search.ts_query(@term, "simple")
query = Search.ts_query(term: @term, ts_config: "simple")
users = users.includes(:user_search_data)
.references(:user_search_data)