fix pgroona note.text query
This commit is contained in:
@@ -225,7 +225,7 @@ export class SearchService {
|
|||||||
.leftJoinAndSelect('renote.user', 'renoteUser');
|
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||||
|
|
||||||
if (this.config.fulltextSearch?.provider === 'sqlPgroonga') {
|
if (this.config.fulltextSearch?.provider === 'sqlPgroonga') {
|
||||||
query.andWhere('note.text &@ :q', { q });
|
query.andWhere('note.text &@~ :q', { q });
|
||||||
} else {
|
} else {
|
||||||
query.andWhere('LOWER(note.text) LIKE :q', { q: `%${ sqlLikeEscape(q.toLowerCase()) }%` });
|
query.andWhere('LOWER(note.text) LIKE :q', { q: `%${ sqlLikeEscape(q.toLowerCase()) }%` });
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user