Bird
Raised Fist0

Given this request to clear caches:

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

What will be the effect?
AAll caches for the <code>sales</code> index will be cleared
BOnly the fielddata cache for the <code>sales</code> index will be cleared
COnly the query cache for the <code>sales</code> index will be cleared
DThe request will fail due to invalid syntax
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the JSON body in the cache clear request

    The body specifies "fielddata": true, which means only the fielddata cache will be cleared for the specified index.
  2. Step 2: Understand cache clearing behavior

    To clear all caches, the body would be empty or specify all caches. This request targets only fielddata cache.
  3. Final Answer:

    Only the fielddata cache for the sales index will be cleared -> Option B
  4. Quick Check:

    Fielddata: true clears only fielddata cache [OK]
Quick Trick: Specify cache type in JSON to clear only that cache [OK]
Common Mistakes:
MISTAKES
  • Assuming all caches clear with one type specified
  • Thinking query cache clears with fielddata true
  • Believing the request syntax is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes