liquid_feedback_frontend
diff model/issue.lua @ 1492:faaf9ec3e09c
Fixed usage of text search index
| author | bsw |
|---|---|
| date | Mon Aug 26 15:49:37 2019 +0200 (2019-08-26) |
| parents | 32cc544d5a5b |
| children |
line diff
1.1 --- a/model/issue.lua Mon Aug 26 15:27:05 2019 +0200 1.2 +++ b/model/issue.lua Mon Aug 26 15:49:37 2019 +0200 1.3 @@ -219,7 +219,7 @@ 1.4 return self:new_selector() 1.5 :join('"initiative"', nil, '"initiative"."issue_id" = "issue"."id"') 1.6 :join('"draft"', nil, '"draft"."initiative_id" = "initiative"."id"') 1.7 - :add_where{ '"initiative"."text_search_data" @@ "text_search_query"(?) OR "draft"."text_search_data" @@ "text_search_query"(?)', search_string, search_string } 1.8 + :add_where{ 'to_tsvector("initiative") @@ "plainto_tsquery"(?) OR to_tsvector("draft") @@ "plainto_tsquery"(?)', search_string, search_string } 1.9 :add_group_by('"issue"."id"') 1.10 end 1.11