From 3ae0897e2945e2f2bd7f59b52835469d3c5301fd Mon Sep 17 00:00:00 2001 From: Artem Baguinski Date: Fri, 13 May 2016 15:47:56 +0200 Subject: [PATCH] pass dictionary to ts_headline() otherwise it breaks when scope uses non-default dictionary (the query and highlight use incompatible dictionaries then) --- lib/pg_search/features/tsearch.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pg_search/features/tsearch.rb b/lib/pg_search/features/tsearch.rb index ddac82e7..8b41dcd2 100644 --- a/lib/pg_search/features/tsearch.rb +++ b/lib/pg_search/features/tsearch.rb @@ -47,7 +47,7 @@ def checks_for_highlight end def ts_headline - "ts_headline((#{document}), (#{tsquery}), '#{ts_headline_options}')" + "ts_headline(#{dictionary.to_sql}, (#{document}), (#{tsquery}), '#{ts_headline_options}')" end def ts_headline_options