Bird
0
0

Given this query:

medium📝 Predict Output Q5 of 15
Elasticsearch - Basic Search Queries
Given this query:
{ "query": { "match": { "content": { "query": "blue sky", "operator": "or" } } } }

Which documents will match?
ADocuments containing neither 'blue' nor 'sky'
BDocuments containing both 'blue' and 'sky'
CDocuments containing either 'blue' or 'sky'
DDocuments containing the exact phrase 'blue sky'
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the operator parameter

    The operator set to "or" means documents matching any of the words will be returned.
  2. Step 2: Determine matching documents

    Documents with 'blue' only, 'sky' only, or both will match.
  3. Final Answer:

    Documents containing either 'blue' or 'sky' -> Option C
  4. Quick Check:

    Operator 'or' in match query = match any word [OK]
Quick Trick: Set operator to 'or' to match any word in match query [OK]
Common Mistakes:
MISTAKES
  • Assuming 'or' means exact phrase match
  • Confusing 'or' with 'and' operator
  • Ignoring operator parameter in match query

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes