Modified: branches/packs/app/controllers/packs_controller.rb (3726 => 3727)
--- branches/packs/app/controllers/packs_controller.rb 2013-09-26 13:05:21 UTC (rev 3726)
+++ branches/packs/app/controllers/packs_controller.rb 2013-09-26 13:36:02 UTC (rev 3727)
@@ -484,6 +484,9 @@
checklist = @pack.research_object.run_checklist!(slug)
+ @pack.solr_index if Conf.solr_enable
+ @pack.update_contribution_rank
+
redirect_to polymorphic_path(address@hidden, checklist])
end
Modified: branches/packs/app/models/pack.rb (3726 => 3727)
--- branches/packs/app/models/pack.rb 2013-09-26 13:05:21 UTC (rev 3726)
+++ branches/packs/app/models/pack.rb 2013-09-26 13:36:02 UTC (rev 3727)
@@ -1061,9 +1061,12 @@
boost = 0
- # initial boost depends on viewings count
- boost = contribution.viewings_count / 100 if contribution
+ # Take checklists into account
+ research_object.checklists.each { |checklist| boost += (checklist.score * 10) }
+ # Take viewings into account
+ boost += contribution.viewings_count / 100 if contribution
+
# Take curation events into account
boost += CurationEvent.curation_score(CurationEvent.find_all_by_object_type_and_object_id('Pack', id))