Bird
0
0

Which syntax correctly represents a term entry in an inverted index?

easy📝 Syntax Q3 of 15
Elasticsearch - Basics and Architecture
Which syntax correctly represents a term entry in an inverted index?
A[{"doc": 1, "term": "apple"}]
B["apple", "banana", "cherry"]
C{"docs": ["apple", "banana"]}
D{"term": "apple", "docs": [1, 3, 5]}
Step-by-Step Solution
Solution:
  1. Step 1: Understand inverted index structure

    An inverted index entry maps a term to a list of document IDs containing it.
  2. Step 2: Identify correct JSON format

    {"term": "apple", "docs": [1, 3, 5]} shows a term with a list of document IDs, matching the inverted index concept.
  3. Final Answer:

    {"term": "apple", "docs": [1, 3, 5]} -> Option D
  4. Quick Check:

    Term to doc list format = {"term": "apple", "docs": [1, 3, 5]} [OK]
Quick Trick: Inverted index entries map terms to document ID lists [OK]
Common Mistakes:
MISTAKES
  • Confusing term list with document list
  • Using wrong JSON structure
  • Swapping keys and values

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Elasticsearch Quizzes