Bird
Raised Fist0

What will be the output of this Elasticsearch query?

medium📝 Command Output Q4 of Q15
Elasticsearch - ELK Stack Integration
What will be the output of this Elasticsearch query?
GET /_cat/indices?v

Assuming the cluster has three indices: logs-2024, metrics-2024, and alerts-2024.
AA JSON array with index names only
BA table listing all indices with details like health, status, and document count
CAn error because _cat API does not support 'v' parameter
DA list of cluster nodes instead of indices
Step-by-Step Solution
Solution:
  1. Step 1: Understand the _cat/indices API

    This API returns a human-readable table of indices with optional verbose output using 'v' parameter.
  2. Step 2: Analyze the expected output

    With 'v', the output includes headers and columns like health, status, docs count for all indices.
  3. Final Answer:

    A table listing all indices with details like health, status, and document count -> Option B
  4. Quick Check:

    _cat/indices?v = Detailed table output [OK]
Quick Trick: Use _cat APIs with 'v' for readable tables [OK]
Common Mistakes:
MISTAKES
  • Expecting JSON output from _cat API
  • Thinking 'v' parameter causes error
  • Confusing indices list with nodes list

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes