Bird
0
0

Identify the error in this reindex request:

medium📝 Debug Q14 of 15
Elasticsearch - Index Management

Identify the error in this reindex request:

{
  "source": { "index": "old_index" },
  "dest": { "index": "new_index" },
  "query": {
    "match": { "status": "active" }
  }
}
AThe query should be inside the "source" object
B"query" is not allowed inside reindex requests
CThe "match" syntax is incorrect
DThe "dest" index name cannot be "new_index"
Step-by-Step Solution
Solution:
  1. Step 1: Check placement of query in reindex

    The query must be inside the source object to filter documents.
  2. Step 2: Validate other parts

    The match syntax is correct, and dest index name is valid.
  3. Final Answer:

    The query should be inside the "source" object -> Option A
  4. Quick Check:

    Put query inside source to filter during reindex [OK]
Quick Trick: Put filters inside source, not at top level [OK]
Common Mistakes:
MISTAKES
  • Placing query outside source object
  • Misunderstanding match query syntax
  • Thinking destination index name is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes