Bird
0
0

What is the result of this wildcard query?

medium📝 Predict Output Q5 of 15
Elasticsearch - Basic Search Queries
What is the result of this wildcard query?
{ "query": { "wildcard": { "title": { "value": "*book" } } } }
AMatches documents where title starts with 'book'
BMatches documents where title ends with 'book', like 'notebook'
CMatches documents where title contains 'book' anywhere
DMatches documents where title exactly equals '*book'
Step-by-Step Solution
Solution:
  1. Step 1: Understand wildcard * usage

    The asterisk (*) matches zero or more characters. Placed before 'book' means any characters before 'book'.
  2. Step 2: Interpret query

    This matches titles ending with 'book', like 'notebook' or 'storybook'.
  3. Final Answer:

    Matches documents where title ends with 'book', like 'notebook' -> Option B
  4. Quick Check:

    Wildcard * before string = ends with pattern [OK]
Quick Trick: Wildcard * before text means ends with pattern [OK]
Common Mistakes:
MISTAKES
  • Thinking *book matches start with 'book'
  • Assuming *book matches anywhere in string
  • Confusing exact match with wildcard

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes