diff options
author | Yorhel <git@yorhel.nl> | 2009-03-30 18:52:47 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-03-30 18:52:47 +0200 |
commit | 09ace0e1e97f9e92f8d4f29a7a9b2556263ef02b (patch) | |
tree | e10bd050bb65516a781f32e15d5142aa93563f19 | |
parent | 621ea2bc69a2a80f32011103c3cce85b276e39ab (diff) |
Tiny bugfix in the tag<->vn calculation
Use a user's highest vote on a child tag in the calculation of the
rating of a parent, rather than the average.
-rw-r--r-- | util/updates/update_2.3.sql | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/updates/update_2.3.sql b/util/updates/update_2.3.sql index db7a2ca7..1a8c9571 100644 --- a/util/updates/update_2.3.sql +++ b/util/updates/update_2.3.sql @@ -143,7 +143,7 @@ BEGIN SELECT * FROM tags_vn UNION SELECT * FROM tag_vn_childs(); -- grouped by (tag, vid, uid), so only one user votes on one parent tag per VN entry CREATE OR REPLACE TEMPORARY VIEW tags_vn_grouped AS - SELECT tag, vid, uid, AVG(vote)::real AS vote, COALESCE(AVG(spoiler), 0)::real AS spoiler + SELECT tag, vid, uid, MAX(vote)::real AS vote, COALESCE(AVG(spoiler), 0)::real AS spoiler FROM tags_vn_all GROUP BY tag, vid, uid; -- grouped by (tag, vid) and serialized into a table DROP INDEX IF EXISTS tags_vn_bayesian_tag; |