Remix.run Logo
grg0 4 days ago

"commonly" is an understatement; that's literally what a book index is by definition.

The only thing "inverted" here is the context. The author even admits themselves that the word->doc mapping is an index:

"If user wants to search by words - then words should be keys in our "database" (index)"

It's a pointless debate of semantics. An inverted map is still a map.

teiferer 4 days ago | parent | next [-]

It's pointless in the sense that the word "inverse" in the term is pointless, a mild way of saying that it's confusing or even unnecessary to the point of being incorrect.

The discussion about it is not pointless since it clears up confusion. It might not have been for you, but it's clearly for many others, so if you think that's pointless then allowing yourself to appreciate other perspectives could go a long way.

An inverted map is still a map, but if you are typically thinking of the map A->B and then suddenly somebody talks about an inverted map, then it's understandable that people start to assume that this is now about B->A and get confused if it somehow actually isn't really.

valiant55 4 days ago | parent | prev [-]

If the documents where themselves stored in a database they have and id and the contents. The clustering key (an index) would be on the id. It's inverted because the contents are deconstructed into tokens with a list of ids that contain that token. Now the contents (tokens) server as the indexed value.