Versions (relevant - OpenSearch/Dashboard/Server OS/Browser):
Latest
Describe the issue:
I am trying to search a set of words and also filter the results using filter and terms options, however, the query does not return anything. If I remove the filter and terms options, then it returns results.
Need help in understanding why this happens.
Here is the query I am using -
search_query = {
“query”: {
“bool”: {
“must”: {
“simple_query_string”: {
“query”: “Heart”,
“fields”: [‘section’, ‘subsection’, ‘question’, ‘answer’],
“default_operator”:“OR”
}
},
"filter": [
{
"term": {"section": "Medicine"}
}
]
}
}
}
Configuration:
Relevant Logs or Screenshots: