Search code examples
javatreemaps

Inverted indexing


I'm working on inverted indexing and my question is: in the final step we should return the total number of documents the word appeared in or just each document number ? for example : if the word "Hello" appeared in 3 documents(document A and document B and document C) I should return 3 or A,B,C ?


Solution

  • An Index implies it will give you a lookup to something, not just a number. A frequency count would give you a count of the number of occurrences of a word.

    BTW You can get the number from the A,B,C but not the other way around.