Bird
0
0

You try to index a document with this request:

medium📝 Debug Q6 of 15
Elasticsearch - Document Operations
You try to index a document with this request:
POST /orders/_doc/123
{
  "item": "Book"
}

What is wrong with this request?
APOST cannot be used to index documents
BThe JSON body is missing a required field
CThe index name is invalid
DPOST should not include the document ID in the URL
Step-by-Step Solution
Solution:
  1. Step 1: Check HTTP method and URL usage

    POST is used with specifying a document ID in the URL.
  2. Step 2: Identify the error in request

    Including ID with POST is incorrect; PUT should be used instead.
  3. Final Answer:

    POST should not include the document ID in the URL -> Option D
  4. Quick Check:

    POST URL must not have ID [OK]
Quick Trick: Use PUT with ID, POST without ID [OK]
Common Mistakes:
MISTAKES
  • Including ID in POST URL
  • Assuming POST can't index
  • Ignoring URL structure rules

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes