From 9b9c9cc382e2bff12b4fa67390898a438c3bb832 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Tue, 22 Oct 2024 16:17:27 +0700 Subject: [PATCH] update: search rootId --- src/controllers/log-controller.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/controllers/log-controller.ts b/src/controllers/log-controller.ts index 93f100b..164c391 100644 --- a/src/controllers/log-controller.ts +++ b/src/controllers/log-controller.ts @@ -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 + "*" }, })),