mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
PERF: Use PG headlines for blurb generation and highlighting for search.
This commit is contained in:
@ -85,8 +85,12 @@ class Search
|
||||
}
|
||||
|
||||
if post.post_search_data.version > SearchIndexer::MIN_POST_REINDEX_VERSION
|
||||
opts[:cooked] = post.post_search_data.raw_data
|
||||
opts[:scrub] = false
|
||||
if SiteSetting.use_pg_headlines_for_excerpt
|
||||
return post.headline
|
||||
else
|
||||
opts[:cooked] = post.post_search_data.raw_data
|
||||
opts[:scrub] = false
|
||||
end
|
||||
else
|
||||
opts[:cooked] = post.cooked
|
||||
end
|
||||
|
Reference in New Issue
Block a user