Complete the code to add a must condition inside the bool query.
{
"query": {
"bool": {
"must": [
[1]
]
}
}
}filter instead of mustThe must clause requires the condition to be matched. Here, a match query on the title field is added.
Complete the code to add a filter condition that matches documents with status 'active'.
{
"query": {
"bool": {
"filter": [
[1]
]
}
}
}match which is analyzedrange for exact matchThe filter clause uses a term query to exactly match the status field to 'active'.
Fix the error in the bool query by completing the missing must_not condition.
{
"query": {
"bool": {
"must": [
{"match": {"title": "search"}}
],
"must_not": [
[1]
]
}
}
}match instead of termThe must_not clause excludes documents with status exactly 'inactive' using a term query.
Fill both blanks to create a bool query with must and filter conditions.
{
"query": {
"bool": {
"must": [
[1]
],
"filter": [
[2]
]
}
}
}match in filterThe must clause requires documents containing 'python' in content. The filter clause limits results to those with status exactly 'published'.
Fill all three blanks to build a bool query combining must, filter, and must_not conditions.
{
"query": {
"bool": {
"must": [
[1]
],
"filter": [
[2]
],
"must_not": [
[3]
]
}
}
}The must clause searches for 'database' in description. The filter clause limits to documents with status 'active'. The must_not clause excludes documents in the 'deprecated' category.