refactor: change from word match to wildcard

This commit is contained in:
Methapon2001 2024-07-30 14:10:07 +07:00
parent 6375a449e6
commit 17205fc2bc

View file

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