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: {
|
||||
should: [
|
||||
{
|
||||
multi_match: {
|
||||
query: search,
|
||||
fields: ["method", "logType", "endpoint", "host", "responseCode"],
|
||||
},
|
||||
},
|
||||
],
|
||||
should: ["method", "logType", "endpoint", "host", "responseCode"].map(
|
||||
(v) => ({
|
||||
wildcard: { [v]: "*" + search + "*" },
|
||||
}),
|
||||
),
|
||||
},
|
||||
},
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue