refactor: change from word match to wildcard
This commit is contained in:
parent
6375a449e6
commit
17205fc2bc
1 changed files with 5 additions and 8 deletions
|
|
@ -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"],
|
),
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue