Bird
Raised Fist0

Given this Elasticsearch request to clear caches:

medium📝 Predict Output Q13 of Q15
Elasticsearch - Performance and Scaling
Given this Elasticsearch request to clear caches:
POST /myindex/_cache/clear
{
  "fielddata": true,
  "query": true
}

What caches will be cleared?
AOnly the query cache
BOnly the fielddata cache
CRequest cache only
DBoth query and fielddata caches
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the JSON body parameters

    The request sets both fielddata and query to true, indicating both caches should be cleared.
  2. Step 2: Understand cache clearing behavior

    When multiple cache types are true, Elasticsearch clears all specified caches.
  3. Final Answer:

    Both query and fielddata caches -> Option D
  4. Quick Check:

    fielddata=true + query=true clears both caches [OK]
Quick Trick: True flags clear all specified caches together [OK]
Common Mistakes:
MISTAKES
  • Assuming only one cache clears at a time
  • Confusing request cache with fielddata cache
  • Ignoring JSON body parameters

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes