Refactor fav:<name> and ordfav:<name> searches to use the favorites table instead of the posts.fav_string. This may be slower for fav:<name> searches. The fav_string effectively treats favorites like secret tags on the post, so fav:<name> searches were effectively the same as tag searches. Now they do a subquery on the favorites table, which may not perform as well for things like multiple fav:<name> metatags or negated fav:<name> metatags. For ordfav:<name> searches, this may be faster. ordfav: searches had a tag match clause (`tag_index @@ 'fav:123'`) in addition to a join on the favs table. This was redundant, and in some cases it inhibited the query planner from choosing a more optimal plan. Partially addresses #4652 by eliminating another place where we depended on the fav_string.
49 KiB
49 KiB