Reputation: 1431
Using ElasicSearch's JSON Query DSL through Kibana, how do I retrieve all documents which have:
messageTemplate
equals My message
level
equals Error
Upvotes: 0
Views: 92
Reputation: 7221
You have to use a Bool query for that :
... If the bool query is a filter context or has neither must or filter then at least one of the should queries must match a document for it to match the bool query
POST <your_index>/_search
{
"query": {
"bool": {
"should": [
{ "match_phrase" : { "messageTemplate" : "My message" } },
{ "term" : { "level" : "Error" } }
]
}
}
}
Upvotes: 2
Reputation: 66
Alternatively, you could type in the Kibana search bar:
messageTemplate:"My message" || level:"Error"
or
messageTemplate:"My message" OR level:"Error"
Upvotes: 1