Hi
Im trying to understand why the below query does not produce the results.
{
"query": {
"bool": {
"filter": {
"terms": {
"classification": [
"secret",
"protected"
]
}
},
"must": {
"query_string": {
"query": "*Johnson*",
"fields": [
"classification",
"firstname",
"releasability",
"person"
]
}
}
}
}
}
So we do have 'Johnson' in elasticsearch in the field person, but the result hit shows 0.
The expected output should be having hits with field Person having 'Johnson'
The filter should work only for field Classification with the values secret and protected, however, as for Person field there should be no filter applied.
If I remove the filter from the above query, it works when searched for Johnson, however the filter needs to be included to filter out some values