fix(backend): pgroongaでの検索時にはじめのキーワード以外が検索に使用されない問題を修正 (#15496)

* fix pgroona note.text query

* Update Changelog

---------

Co-authored-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
かっこかり
2025-02-15 19:26:02 +09:00
committed by GitHub
parent 9611bfbbf7
commit 88900492a4
2 changed files with 3 additions and 1 deletions

View File

@@ -220,7 +220,7 @@ export class SearchService {
.leftJoinAndSelect('renote.user', 'renoteUser');
if (this.config.fulltextSearch?.provider === 'sqlPgroonga') {
query.andWhere('note.text &@ :q', { q });
query.andWhere('note.text &@~ :q', { q });
} else {
query.andWhere('LOWER(note.text) LIKE :q', { q: `%${ sqlLikeEscape(q.toLowerCase()) }%` });
}