I have a list of bigrams that I would like to search for. How can I specify each of them dynamically ?
"query" : {
"bool" : {
"must": [
{ "match" : { "content": "<query string>"}},
],
"should":[
{ "match_phrase" : {"content": bigrams[0]}},
{ "match_phrase" : {"content": bigrams[1]}}
]
}
},
The length of the bigrams list will vary, so is there a way to specify the match_phrase strings dynamically ?