Files
danbooru/app/logical
evazion 6dd331745a Rewrite related tags implementation.
Rewrite the implementation of related tags to be simpler, faster, and
more accurate:

* The related tags are now calculated by taking a random sample of 1000
  posts, finding the top 250 most frequent tags among those posts, then
  ordering those tags by cosine similarity.

* Related tags can generally be calculated in 50-300ms at these sample
  sizes. Very high sample sizes (25000+ posts) are still relatively fast
  (1-3 seconds), but generally they don't improve accuracy much.

* Related tags are now cached in redis rather than in the tags table.
  The related_tags column in the tags table is no longer used.

* Only the related tags in the search taglist are cached. The related
  tags returned by the 'Related tags' button are not cached.

* The cache lifetime is a fixed 4 hours.

* The 'Related tags' button now works with metatags.

* The /related_tag page now works with metatags and multitag searches.

Fixes #4134, #4146.
2019-08-30 20:03:36 -05:00
..
2018-08-24 12:10:51 -07:00
2014-02-28 16:40:11 -08:00
2018-08-03 17:40:00 -07:00
2018-01-13 20:55:52 -08:00
2019-08-30 20:03:36 -05:00
2019-08-01 00:06:18 -05:00
2018-09-11 14:19:17 -07:00
2018-08-24 12:10:51 -07:00
2018-06-23 11:15:14 -07:00
2018-08-24 12:10:51 -07:00
2017-10-12 16:36:17 -07:00
2017-02-21 13:40:52 -08:00