From 9748aa6b1f1789ad98446781f958e154b7432086 Mon Sep 17 00:00:00 2001 From: Rafael Martins Date: Sun, 15 Apr 2012 19:45:46 -0300 Subject: [PATCH] Two fixes for Product model --- app/models/product.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/product.rb b/app/models/product.rb index bb97209..96b388b 100644 --- a/app/models/product.rb +++ b/app/models/product.rb @@ -274,7 +274,7 @@ class Product < ActiveRecord::Base acts_as_searchable :fields => facets_fields_for_solr + [ # searched fields {:name => {:type => :text, :boost => 2.0}}, - {:description => :text}, + {:description => :text}, {:category_full_name => :text}, # filtered fields {:public => :boolean}, {:environment_id => :integer}, {:category_filter => :integer}, @@ -291,5 +291,6 @@ class Product < ActiveRecord::Base ], :facets => facets_option_for_solr, :boost => proc{ |p| boost = 1; Boosts.each{ |b| boost = boost * (1 - ((1 - b[2].call(p)) * b[1])) }; boost} handle_asynchronously :solr_save + after_save_reindex [:enterprise], :with => :delayed_job end -- libgit2 0.21.2