refactor: search cover more field

This commit is contained in:
Methapon2001 2024-07-31 15:59:15 +07:00
parent e04f40c58e
commit 8189813b4f

View file

@ -53,11 +53,16 @@ export class LogController extends Controller {
? [ ? [
{ {
bool: { bool: {
should: ["method", "logType", "endpoint", "host", "responseCode"].map( should: [
(v) => ({ "method",
wildcard: { [v]: "*" + search + "*" }, "logType",
}), "endpoint",
), "host",
"responseCode",
"output",
].map((v) => ({
wildcard: { [v]: "*" + search + "*" },
})),
}, },
}, },
] ]