Skip to content

freetags 4.1: Base related entries on amount of shared tags#211

Open
onli wants to merge 3 commits intomasterfrom
feature/freetagsRelated
Open

freetags 4.1: Base related entries on amount of shared tags#211
onli wants to merge 3 commits intomasterfrom
feature/freetagsRelated

Conversation

@onli
Copy link
Member

@onli onli commented Feb 20, 2026

Instead of taking all entries with common tags and to order them by date, now it orders all those entries first by the amount of common tags. That way entries that are topically related will feature more prominently in the list of related entries, if tagged accordingly

Instead of taking all entries with common tags and to order them by date, now it orders all those entries first by the amount of common tags. That way entries that are topically related will feature more prominently in the list of related entries, if tagged accordingly
@mattsches
Copy link
Member

I like the idea 👍

However, I'm not sure if this works with all supported DBMS, some tend to be restrictive concerning GROUP BY clauses (there is the ONLY_FULL_GROUP_BY sql_mode in MySQL, and PostgreSQL might complain about missing columns in the GROUP BY clause, etc…).

@onli
Copy link
Member Author

onli commented Feb 24, 2026

Good point, I tested only on sqlite so far. I'll give this a testrun on my dev server with mysql and postres as configured by uberspace.

@onli
Copy link
Member Author

onli commented Feb 24, 2026

But of course, if you can test as well or have a solution for one of these DBs, that would be great :)

@onli
Copy link
Member Author

onli commented Feb 24, 2026

@mattsches, okay, got it I think! You were completely right, postgres did not like the missing columns. I added them, expecting the count to fail then, but no, everything seems to work fine. Tests still welcome ;) But less necessary now.

Thanks for catching this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants