patternModerate
Why is the inverted index called so and not simply index?
Viewed 0 times
whythecalledinvertedandindexsimplynot
Problem
In my notes is represented like this:
From wikipedia:
In computer science, an inverted index (also referred to as a postings
file or inverted file) is a database index storing a mapping from
content, such as words or numbers, to its locations in a table, or in
a document or a set of documents.
Where is the inversion with respect to a normal index (like the one found at the end of books)?
Index: (in a book or set of books) an alphabetical list of names,
subjects, etc. with reference to the pages on which they are
mentioned.
Am I missing something? Like a nuance of the meaning of the name due to the fact that english is not my main language.
From wikipedia:
In computer science, an inverted index (also referred to as a postings
file or inverted file) is a database index storing a mapping from
content, such as words or numbers, to its locations in a table, or in
a document or a set of documents.
Where is the inversion with respect to a normal index (like the one found at the end of books)?
Index: (in a book or set of books) an alphabetical list of names,
subjects, etc. with reference to the pages on which they are
mentioned.
Am I missing something? Like a nuance of the meaning of the name due to the fact that english is not my main language.
Solution
Here is an array:
Here 0,1,2 are indices.
Now suppose that we want to know which index contains a given word. Then we use a dictionary:
This is an inverted index (according to your Wikipedia quote).
The word index has different meaning in different contexts:
- A[0] = Alice
- A[1] = Bob
- A[2] = Charlie
Here 0,1,2 are indices.
Now suppose that we want to know which index contains a given word. Then we use a dictionary:
- D[Alice] = 0
- D[Bob] = 1
- D[Charlie] = 2
This is an inverted index (according to your Wikipedia quote).
The word index has different meaning in different contexts:
- Technical books often have an index of terms at the end.
- The Catholic church held an index of forbidden books.
- In economics, there are financial indices.
- In computer science, an index is usually an integer used to index into an array.
Context
StackExchange Computer Science Q#130814, answer score: 17
Revisions (0)
No revisions yet.