fix(backend): より多くの人に使われているハッシュタグが検索結果上位に来るように (#11498) (#13340)

This commit is contained in:
okayurisotto 2024-02-23 18:02:12 +09:00 committed by GitHub
parent b8d8b359bc
commit a861f913a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,7 +43,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
super(meta, paramDef, async (ps, me) => {
const hashtags = await this.hashtagsRepository.createQueryBuilder('tag')
.where('tag.name like :q', { q: sqlLikeEscape(ps.query.toLowerCase()) + '%' })
.orderBy('tag.count', 'DESC')
.orderBy('tag.mentionedLocalUsersCount', 'DESC')
.groupBy('tag.id')
.limit(ps.limit)
.offset(ps.offset)