I want to match records against a query string, so I wrote the following query which is working fine:
{
"query": {
"query_string": {
"fields": ["rollno","name"],
"query": "*John*"
}
}
}
Now, apart from matching the fields
, I want to implement IN
query against another field as well. I tried this query, as:
{
"query": {
"query_string": {
"fields": ["rollno", "name"],
"query": "*John*"
},
"match": {
"majorSubject": ["Biology", "Chemistry"]
}
}
}
All I get is search_parse_exception
.
How to this IN
operation?