fix performance of SQL LIKE note search
This commit is contained in:
parent
667262dcfb
commit
493000290b
1 changed files with 1 additions and 1 deletions
|
@ -281,7 +281,7 @@ export class SearchService {
|
|||
if (this.config.fulltextSearch?.provider === 'sqlPgroonga') {
|
||||
query.andWhere('note.text &@~ :q', { q });
|
||||
} else {
|
||||
query.andWhere('LOWER(note.text) LIKE :q', { q: `%${ sqlLikeEscape(q.toLowerCase()) }%` });
|
||||
query.andWhere('note.text ILIKE :q', { q: `%${ sqlLikeEscape(q) }%` });
|
||||
}
|
||||
|
||||
if (opts.host) {
|
||||
|
|
Loading…
Add table
Reference in a new issue