Bird
0
0

Given these documents indexed:

medium📝 query result Q4 of 15
Elasticsearch - Basics and Architecture
Given these documents indexed:
Doc1: "cat dog cat"
Doc2: "dog mouse"
Doc3: "cat mouse dog"
What documents will the inverted index list for the term "dog"?
A[1, 2, 3]
B[2, 3]
C[1, 3]
D[1, 2]
Step-by-Step Solution
Solution:
  1. Step 1: Identify documents containing "dog"

    Doc1 has "dog", Doc2 has "dog", Doc3 has "dog".
  2. Step 2: List all document IDs containing "dog"

    All three documents 1, 2, and 3 contain the term "dog".
  3. Final Answer:

    [1, 2, 3] -> Option A
  4. Quick Check:

    Term "dog" documents = [1, 2, 3] [OK]
Quick Trick: Check all docs for the term, not just first or last [OK]
Common Mistakes:
MISTAKES
  • Missing Doc1 which contains "dog"
  • Listing only two documents
  • Confusing term presence

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes