After seeing a few answers, I still didnt get a full grip on this issue.
I want to mix the bool and range query.
For an example I want to dinf all logs that terminationCauseis success in the last 5 minutes.
Something like this:
{
"query":{
"query": {
"bool":{
"must" : [
{"term" : {"terminationCause": "SUCCESS"}}
]
}
}
},
{
"query": {
"range" : {
"msgSubmissionTime" : {
"gte" : "now-2m",
"lt" : "now"
}
}
}
}
}
How can I do this?
(Sorry about the identation from some reason it didnt work)