I’m trying to filter records based on multiple HTTP paths and methods, such as /api/v1/users
with GET
and /api/v1/product
with POST
for a specific CallerId. However, with the current query I’m using, I’m only retrieving records for one path.
"query": {
"bool": {
"must": [
{
"match_phrase": {
"data.Identity.CallerId": "9C51E5FC-761E-4D54-82B9-6D41C9189307"
}
},
{
"bool": {
"should": [
{
"bool": {
"must": [
{
"match_phrase": {
"data.RequestInfo.Path": "/api/v1/product"
}
},
{
"match_phrase": {
"data.RequestInfo.HttpMethod": "POST"
}
}
]
}
},
{
"bool": {
"must": [
{
"match_phrase": {
"data.RequestInfo.Path": "/api/v1/users"
}
},
{
"match_phrase": {
"data.RequestInfo.HttpMethod": "GET"
}
}
]
}
}
],
"minimum_should_match": 1
}
}
]
}
},
"sort": [
{
"@timestamp": {
"order": "desc"
}
}
],
"from": 0,
"size": 10
}```