Revert "update SearchService"

This reverts commit a9acf532c1.
This commit is contained in:
fly_mc 2024-11-18 02:41:44 +08:00
parent 23a5f68e94
commit 1471039199

View file

@ -4,7 +4,7 @@
*/
import { Inject, Injectable } from '@nestjs/common';
import { Brackets, In } from 'typeorm';
import { In } from 'typeorm';
import { DI } from '@/di-symbols.js';
import type { Config } from '@/config.js';
import { bindThis } from '@/decorators.js';
@ -215,10 +215,7 @@ export class SearchService {
}
query
.andWhere(new Brackets((qb => {
qb.where('note.text &@~ :q', { q: sqlLikeEscape(q) })
.orWhere('note.cw &@~ :q', { q: sqlLikeEscape(q) });
})))
.andWhere('note.text &@~ :q', { q: sqlLikeEscape(q) })
.innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')