I have a must query which looks like this:
{
"query": {
"bool": {
"must": [{
"match": {
"section": {
"query": "word1",
"boost": "3"
}
}
}, {
"match": {
"section": {
"query": "word2",
"boost": "4"
}
}
}]
}
}
}
How can I make it "OR" i.e. All the documents which match "word1", "word2" or both, because the above code gives me results in the documents which contain both "word1" and "word2".
I read in the documentation that this can be achieved by using should in the filter context but I couldn't find any example.
Thanks