Full text search set to english
This commit is contained in:
parent
bb3d390681
commit
3f1ec0b202
1 changed files with 5 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue