Basic implementation of an inverted index