Bird
0
0

Which of the following is the correct syntax for a basic match query in Elasticsearch?

easy📝 Syntax Q12 of 15
Elasticsearch - Basic Search Queries
Which of the following is the correct syntax for a basic match query in Elasticsearch?
A{ "match": { "field": "search text" } }
B{ "match": "field": "search text" }
C{ "match": { "field" = "search text" } }
D{ "match": [ "field", "search text" ] }
Step-by-Step Solution
Solution:
  1. Step 1: Review correct JSON structure for match query

    The match query requires a JSON object with the field name as key and the search text as value inside another object.
  2. Step 2: Identify syntax errors in options

    { "match": { "field": "search text" } } uses correct JSON with colon separators and nested object. Options A, B, and C have syntax errors like missing braces, wrong assignment, or array usage.
  3. Final Answer:

    { "match": { "field": "search text" } } -> Option A
  4. Quick Check:

    Correct JSON syntax = { "match": { "field": "search text" } } [OK]
Quick Trick: Match query uses nested JSON with field: text inside match [OK]
Common Mistakes:
MISTAKES
  • Using equal sign instead of colon
  • Missing curly braces around field and text
  • Using array instead of object for field and text

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes