I want to filter documents of the below kind with a elasticsearch query
{
"_index" : "logs-000001",
"_type" : "_doc",
"_id" : "GkA5koEBhT9d1rYBb7_e",
"_score" : null,
"_source" : {
"timestamp" : 1656015577105,
"message" : "2022-06-23 20:19:37 +0000 [info]: #0 Faraday error: logs.input.app1-7594a7072372481283701560b4efc07:578087ee41d47354bae68162e1490c434fcb68631eb42a6c2fae953aaae61831",
"ingestionTime" : 1656015581351,
"eventId" : "36930381429816247681747540585230094267893920556028395521",
"logGroup" : "logs-release200",
"logStream" : "logs/kinesis/964da56be54b47fda012669544502f4b"
}
}
Query I have come up with so far
GET logs/_search
{
"sort": [
{
"timestamp": {
"order": "desc"
}
}
],
"query": {
"bool": {
"must": [
{
"query_string": {
"default_field": "message",
"query": "*[info]: #0 Faraday error:*"
}
}
]
}
}
I want to filter the query string for the particular message pattern. The query I have also brings other records that do not match the pattern. Any help in refining the query is appreciated. TIA