Use an inverted file data structure.