Bird
0
0

You wrote this query to find documents with 'apple' in the description:

medium📝 Debug Q14 of 15
Elasticsearch - Basics and Architecture
You wrote this query to find documents with 'apple' in the description:
{"query": {"match": {"description": "apple"}}

But Elasticsearch returns an error. What is wrong?
AThe field name 'description' is invalid
BThe word 'apple' is not allowed in queries
CThe JSON query is missing a closing brace '}'
DElasticsearch does not support match queries
Step-by-Step Solution
Solution:
  1. Step 1: Check JSON syntax carefully

    The query is missing a closing brace '}' at the end, making it invalid JSON.
  2. Step 2: Verify other options

    Words like 'apple' are allowed, 'description' can be a valid field, and match queries are supported.
  3. Final Answer:

    The JSON query is missing a closing brace '}' -> Option C
  4. Quick Check:

    JSON syntax error = missing brace [OK]
Quick Trick: Always check JSON braces and commas carefully [OK]
Common Mistakes:
MISTAKES
  • Ignoring JSON syntax errors
  • Assuming certain words are banned
  • Thinking field names must be predefined

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes