Elasticsearch - Search Results and Scoring
You want to rank documents by relevance but also exclude those with "draft" status. Which query correctly ranks by relevance and filters out drafts?
{
"query": {
"bool": {
"must": {
"match": { "text": "Elasticsearch" }
},
"filter": {
"term": { "status": "draft" }
}
}
}
}