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

[Feature]: 更好的评论热度计算算法 #1679

Open
AnzhiZhang opened this issue Dec 20, 2022 · 2 comments
Open

[Feature]: 更好的评论热度计算算法 #1679

AnzhiZhang opened this issue Dec 20, 2022 · 2 comments
Labels
contribution welcome Contribution about current issue is welcomed discussion Question or dicussion enhancement New feature or request Inactive

Comments

@AnzhiZhang
Copy link
Contributor

AnzhiZhang commented Dec 20, 2022

问题描述 | Describe the bug

目前热度按照顶层评论的点赞数计算,建议改为以下算法:
顶层评论点赞数+子评论数+子评论点赞总数

问题网站 | Website URL

https://blog.zhanganzhi.com/zh-CN/2022/06/7b049d0aa9ff/

服务部署在哪里? | Where your waline deploy?

Vercel (Default)

数据存储在哪里?| Where your comment data store?

LeanCloud(https://leancloud.app)

@AnzhiZhang AnzhiZhang added the bug Something isn't working label Dec 20, 2022
@lizheming lizheming added enhancement New feature or request discussion Question or dicussion contribution welcome Contribution about current issue is welcomed and removed bug Something isn't working labels Dec 21, 2022
@AnzhiZhang
Copy link
Contributor Author

AnzhiZhang commented Feb 1, 2023

看了下代码,是 API 响应的时候通过数据库排序获取的,并不是获取所有评论后计算。想了一下这个功能的实现,最好的方法可能是直接统计每一条评论的热度插到数据库里,当有新点赞将本评论热度+1,有子评论时热度+1,子评论被点赞也要加到根评论上的热度,按热度返回时以这个列来排序。

@AnzhiZhang AnzhiZhang changed the title [Bug]: 热度的排序不是计算所有子评论的 [Feature]: 更好的评论热度计算算法 Feb 1, 2023
@lizheming lizheming removed the Inactive label Feb 2, 2023
@ayakasuki
Copy link

ayakasuki commented Jul 22, 2023

而且有个问题,部署以后我发现,一些评论出现在热度排序,一些只在正序,倒序直接显示【来评论吧】 就很奇怪


And there is a problem. After the deployment, I found that some comments appear in the popularity ranking, some are only in the forward order, and the reverse order is directly displayed [Come and comment] It's very strange

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome Contribution about current issue is welcomed discussion Question or dicussion enhancement New feature or request Inactive
Projects
None yet
Development

No branches or pull requests

3 participants