Bird
Raised Fist0

Find the mistake in this saved search filter:

medium📝 Debug Q7 of Q15
Elasticsearch - Kibana and Visualization
Find the mistake in this saved search filter:
{"query": {"filtered": {"filter": {"term": {"user": "john"}}}}}
A"filtered" query is deprecated and should be replaced with bool filter
BTerm filter cannot be used inside filtered query
CMissing closing brackets in JSON
DUser field must be numeric for term filter
Step-by-Step Solution
Solution:
  1. Step 1: Recognize deprecated syntax

    "filtered" query is deprecated in recent Elasticsearch versions.
  2. Step 2: Recommend modern syntax

    Use bool query with filter clause instead of filtered query.
  3. Final Answer:

    "filtered" query is deprecated and should be replaced with bool filter -> Option A
  4. Quick Check:

    Use bool filter, not filtered query [OK]
Quick Trick: Avoid deprecated filtered query; use bool filter [OK]
Common Mistakes:
MISTAKES
  • Using deprecated filtered query syntax
  • Assuming term filter requires numeric field
  • Ignoring JSON syntax correctness

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes