Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Show Similiar blog posts #337

Merged
merged 1 commit into from
Jun 24, 2024
Merged

feat: Show Similiar blog posts #337

merged 1 commit into from
Jun 24, 2024

Conversation

linkdotnet
Copy link
Owner

@linkdotnet linkdotnet commented Jun 23, 2024

Adding a feature where 3 related blog posts are shown under the main blog post.
This is done by a new background job that calculates similar blog posts and puts them into a new table.
Those entries are then shown.

image

@linkdotnet
Copy link
Owner Author

linkdotnet commented Jun 23, 2024

CC @sa-es-ir

EDIT: Hey Saeed - I am in the midst of pushing a new feature that allows readers to read articles that are related.
This is done by a similarity matrix that will be updated when a blog post is created/updated.
Currently, the default is that the user has to expand the area to see related articles, but I could also expand this by default.

The algorithm takes title, short description and tags into account and not the main content (at least as of now).

@linkdotnet linkdotnet force-pushed the related-blog-posts branch 2 times, most recently from bd1d7c7 to fe9576b Compare June 23, 2024 21:00
@linkdotnet linkdotnet merged commit 165595f into master Jun 24, 2024
1 check passed
@linkdotnet linkdotnet deleted the related-blog-posts branch June 24, 2024 06:12
@sa-es-ir
Copy link

sa-es-ir commented Jun 24, 2024

@linkdotnet Thanks for letting me know, it's a cool feature. A quick question, since there is a new table added, is there anything I need to consider to update the database with old data?

@linkdotnet
Copy link
Owner Author

No, it just needs that new table (if you use a SQL Database, you can basically grab the query from the MIGRATION.md and add the new entry to your appsettings.json).

The similarity matrix is built every time a blog post is published or updated. Therefore, just updating a blog post without editing it will trigger everything.

@linkdotnet
Copy link
Owner Author

It is v1 of the Tokenzier and Vectorizer - so results may vary ;)
I will work on improving the nits and bits, but the general structure should stay the same.

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.

None yet

2 participants