diff --git a/app/models/team.rb b/app/models/team.rb index 9facc8b32..02387976a 100644 --- a/app/models/team.rb +++ b/app/models/team.rb @@ -545,9 +545,9 @@ def filtered_fact_checks(filters = {}) end def filter_by_keywords(query, filters, type = 'FactCheck') - tsquery = Team.sanitize_sql_array(["websearch_to_tsquery(?)", filters[:text]]) # FIXME: May not work for all languages + tsquery = Team.sanitize_sql_array(["websearch_to_tsquery(?)", filters[:text]]) if type == 'FactCheck' - tsvector = "to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(summary, '') || coalesce(url, ''))" + tsvector = "to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(summary, '') || coalesce(url, '') || coalesce(claim_descriptions.description, '') || coalesce(claim_descriptions.context, ''))" else tsvector = "to_tsvector('simple', coalesce(title, '') || ' ' || coalesce(description, '') || coalesce(url, ''))" end