Bird
Raised Fist0

Given this saved search filter:

medium📝 Predict Output Q4 of Q15
Elasticsearch - Kibana and Visualization
Given this saved search filter:
{"query": {"bool": {"filter": [{"term": {"category": "books"}}, {"range": {"price": {"lte": 20}}}]}}}

What documents will this saved search return?
ADocuments in category 'books' with price greater than 20
BDocuments in any category with price less than or equal to 20
CDocuments with price exactly 20 only
DDocuments in category 'books' with price less than or equal to 20
Step-by-Step Solution
Solution:
  1. Step 1: Analyze filter conditions

    Filter requires category 'books' and price less than or equal to 20.
  2. Step 2: Understand combined filter effect

    Both conditions must be true, so documents must match both filters.
  3. Final Answer:

    Documents in category 'books' with price less than or equal to 20 -> Option D
  4. Quick Check:

    Filter conditions combined = Documents in category 'books' with price less than or equal to 20 [OK]
Quick Trick: Filters combine with AND logic inside bool filter [OK]
Common Mistakes:
MISTAKES
  • Assuming filters combine with OR logic
  • Ignoring one of the filter conditions
  • Misreading range operator

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes