docbrown/lib/data_update_scripts/20201120001727_populate_explicit_follow_points.rb
Ben Halpern d759ac4627
Add implicit points to follows to improve feed relevancy (in all algorithms) (#11513)
* Fix menu dropdown disable issue

* Initial base work

* Add real algorithm

* Add working object and test

* Fix schema

* Fix schema

* Fix schema

* Finalize

* Add update script and explict_points

* Proper implicit/explicit points

* Fix tests

* Add docs

* Fix tests

* Fix data update script test

* Fix data update script test

* Fix typo

* Improve efficiency and add more logic

* Changed to find_each

* Change to bulk insert

* Update tests and refactor logic

* Various improvements

* Fix typo

* Fix tests

* Remove extra line

* Fix tests

* Fix test typo

* Cache site-wide tag names
2020-11-25 16:09:51 -05:00

7 lines
195 B
Ruby

module DataUpdateScripts
class PopulateExplicitFollowPoints
def run
Follow.connection.execute('UPDATE "follows" SET "explicit_points" = "points" WHERE points != 1')
end
end
end