Is it possible to omit results with a zero score when doing a filtered query? Take the following query for example:
GET demo/_search?pretty
{
"query": {
"bool": {
"should": {
"match": {
"part_number": {
"query": "S1-SS2"
}
}
},
"filter": {
"nested": {
"path": "categories",
"query": {
"term": {
"categories.omit": false
}
}
}
}
}
}
}
Without the filter clause, this query only returns scored results where the "part_number" matches "S1-SS2". With the filter clause, however, I'm getting those scored matches alongside hundreds of results with score of "0.0" -- seemingly every document in my index that matches the filter clause. I'm hoping there is a way I can remove these non-matching results from my query.
Thank you!