From fc5d5b0ef3d60b9a35f128dc70ec2ec5c05211ed Mon Sep 17 00:00:00 2001 From: Rafael Martins Date: Mon, 20 Feb 2012 03:22:01 -0200 Subject: [PATCH] Index categories on article searching --- app/models/article.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/article.rb b/app/models/article.rb index 3f62515..5b6c6b5 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -639,12 +639,12 @@ class Article < ActiveRecord::Base :order => [:f_type, :f_published_at, :f_profile_type, :f_category] acts_as_searchable :additional_fields => [ - {:name => {:type => :string}}, + {:name_sort => {:type => :string}}, {:public => {:type => :boolean}}, {:environment_id => {:type => :integer}}, ] + facets_fields_for_solr, :exclude_fields => [:setting], - :include => [:profile, :comments], + :include => [:profile, :comments, :categories], :facets => facets_option_for_solr, :boost => proc {|a| 10 if a.profile.enabled}, :if => proc{|a| ! ['RssFeed'].include?(a.class.name)} -- libgit2 0.21.2