From 3f1ec0b202a98145f3e3c8bf8121f488607e31e1 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Mon, 29 Dec 2014 20:14:41 +0100 Subject: [PATCH] Full text search set to english --- app/models/package.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/package.rb b/app/models/package.rb index fa5a7ec..5c755f5 100644 --- a/app/models/package.rb +++ b/app/models/package.rb @@ -3,7 +3,11 @@ class Package < ActiveRecord::Base # https://github.com/Casecommons/pg_search include PgSearch # TODO: Make search weighted on users' rating - pg_search_scope :general_search, :against => [:name, :description, :long_description] + pg_search_scope :general_search, + :against => [:name, :description, :long_description], + :using => { + :tsearch => {:dictionary => "english"} + } # I am using "destroy_all" here so that when a package gets destroys the # callbacks for all dependent screenshots are executed - thus removing the