Bird
0
0

Given this multi-match query:

medium📝 Predict Output Q4 of 15
Elasticsearch - Basic Search Queries
Given this multi-match query:
{ "multi_match": { "query": "fast car", "fields": ["title", "description"] } }
What will Elasticsearch do?
ASearch for documents where "fast car" appears in either title or description
BSearch only the title field for "fast car"
CSearch for documents containing both words in all fields
DReturn documents without filtering
Step-by-Step Solution
Solution:
  1. Step 1: Understand multi-match query behavior

    The query searches the given text "fast car" across the specified fields "title" and "description".
  2. Step 2: Analyze options

    Search for documents where "fast car" appears in either title or description correctly states it searches either field. Search only the title field for "fast car" limits to title only. Search for documents containing both words in all fields requires both words in all fields, which is not default. Return documents without filtering is incorrect as it does filter.
  3. Final Answer:

    Search for documents where "fast car" appears in either title or description -> Option A
  4. Quick Check:

    Multi-match searches multiple fields = Search for documents where "fast car" appears in either title or description [OK]
Quick Trick: Multi-match searches all listed fields for query text [OK]
Common Mistakes:
MISTAKES
  • Assuming search is limited to one field
  • Thinking all words must appear in all fields
  • Believing multi-match returns unfiltered results

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes