PERF: Use PG headlines for blurb generation and highlighting for search.

This commit is contained in:
Guo Xiang Tan
2020-08-06 14:15:31 +08:00
parent ba482c251c
commit 2193d02433
5 changed files with 48 additions and 15 deletions

View File

@ -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