for example i've the query, and want to re-write the query using constant_score
for filter.
{
"query": {
"bool": {
"must": [{ "term": { "slug": "awe2ome" } }],
"must_not": [{ "term": { "slug": "not_awe2ome" } }],
"should": [{ "term": { "title": "title" } }],
"filter": [{ "term": { "is_deleted": false } }],
"minimum_should_match": 1
}
}
}
i know the below example is wrong format.
how to re-write the example with right format?
{
"query": {
"bool": {
"must": [{ "term": { "slug": "awe2ome" } }],
"must_not": [{ "term": { "slug": "not_awe2ome" } }],
"should": [{ "term": { "title": "title" } }],
"minimum_should_match": 1
},
"constant_score": {
"filter": {
"bool": {
"must": [{ "term": { "is_deleted": false } }]
}
}
}
}
}