ref: master
plugins/solr/lib/ext/products_plugin/certifier.rb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
if defined? ProductsPlugin require_dependency 'products_plugin/certifier' ActiveSupport.run_load_hooks :solr_certifier module ProductsPlugin class Certifier after_save_reindex [:products], with: :delayed_job extend SolrPlugin::ActsAsSearchable acts_as_searchable fields: SEARCHABLE_FIELDS.map{ |field, options| {field => {boost: options[:weight]}} } end end end |