Bird
Raised Fist0

What will happen if you run this command?

medium📝 Predict Output Q5 of Q15
Elasticsearch - Performance and Scaling
What will happen if you run this command?
POST /_cache/clear { "query": true }
AReturn an error because index is missing
BClear request cache for all indices
CClear query cache for all indices
DClear fielddata cache for all indices
Step-by-Step Solution
Solution:
  1. Step 1: Understand the endpoint and body

    The endpoint /_cache/clear without index clears caches cluster-wide. The body { "query": true } clears query cache.
  2. Step 2: Confirm behavior for missing index

    When no index is specified, cache clear applies to all indices, no error occurs.
  3. Final Answer:

    Clear query cache for all indices -> Option C
  4. Quick Check:

    /_cache/clear with query:true clears query cache cluster-wide [OK]
Quick Trick: No index means clear cache for all indices [OK]
Common Mistakes:
MISTAKES
  • Expecting error if index is missing
  • Confusing query cache with request cache
  • Thinking fielddata cache clears with query:true

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes