update: search rootId

This commit is contained in:
AdisakKanthawilang 2024-10-22 16:17:27 +07:00
parent ed23b8690d
commit 9b9c9cc382

View file

@ -26,6 +26,7 @@ export class LogController extends Controller {
body: {
size: number;
search?: string;
rootId?: string;
multiSearch?: string[];
searchAfter?: number;
date?: Date;
@ -54,6 +55,7 @@ export class LogController extends Controller {
bool: {
must: [
...(systemName ? [{ match: { systemName } }] : []),
...(!!body.rootId ? [{ match: { rootId: body.rootId } }] : []),
...(body.search
? [
{
@ -65,6 +67,7 @@ export class LogController extends Controller {
"host",
"responseCode",
"output",
"rootId",
].map((v) => ({
wildcard: { [v]: "*" + body.search + "*" },
})),