{
"size": 0,
"query": {
"bool": {
"must": [
{
"match": {
"cid": {
"query": "AFM"
}
}
},
{
"match": {
"web_code": "P" // how to write multiple codes here
}
}
]
}
}
}
The above is working fine for a single value. How to fetch with multiple web codes using must syntax..?
You can do it with a terms
query instead of match
:
{
"size": 0,
"query": {
"bool": {
"must": [
{
"terms": {
"web_code.keyword": ["P", "R", "S", "T"]
}
}
]
}
}
}