Bird
Raised Fist0

Given this saved search JSON snippet, what documents will it return?

medium📝 Predict Output Q13 of Q15
Elasticsearch - Kibana and Visualization
Given this saved search JSON snippet, what documents will it return?
{"query": {"filtered": {"query": {"match": {"title": "book"}}, "filter": {"term": {"status": "published"}}}}}
ADocuments with title containing 'book' and status 'published'
BDocuments with title containing 'book' or status 'published'
CDocuments with status 'published' only
DDocuments with title containing 'book' only
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the query and filter parts

    The query matches documents where title contains 'book'. The filter restricts to status 'published'.
  2. Step 2: Understand filtered query behavior

    Filtered query returns documents matching both query and filter conditions (AND logic).
  3. Final Answer:

    Documents with title containing 'book' and status 'published' -> Option A
  4. Quick Check:

    Filtered query = query AND filter [OK]
Quick Trick: Filtered queries combine query and filter with AND logic [OK]
Common Mistakes:
MISTAKES
  • Thinking query and filter use OR logic
  • Ignoring the filter part
  • Confusing match and term filters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes