Bird
Raised Fist0

You set index.refresh_interval to -1 to disable automatic refresh during heavy indexing. After indexing, you want to make all data searchable immediately. What is the correct way to do this?

medium📝 Debug Q14 of Q15
Elasticsearch - Performance and Scaling
You set index.refresh_interval to -1 to disable automatic refresh during heavy indexing. After indexing, you want to make all data searchable immediately. What is the correct way to do this?
ASet <code>index.refresh_interval</code> back to <code>0</code>
BRun a manual <code>_refresh</code> API call on the index
CRestart the Elasticsearch cluster
DDelete and recreate the index
Step-by-Step Solution
Solution:
  1. Step 1: Understand disabling refresh with -1

    Setting refresh_interval to -1 disables automatic refresh, so new data is not searchable until manually refreshed.
  2. Step 2: Identify how to make data searchable immediately

    Using the _refresh API triggers an immediate refresh, making all indexed data searchable without restarting or recreating.
  3. Final Answer:

    Run a manual _refresh API call on the index -> Option B
  4. Quick Check:

    Manual refresh needed when auto refresh disabled [OK]
Quick Trick: Use _refresh API to make data searchable after disabling refresh [OK]
Common Mistakes:
MISTAKES
  • Setting refresh_interval to 0 instead of calling _refresh
  • Restarting cluster unnecessarily
  • Deleting index instead of refreshing

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes