Inverted index to sort contents of one or multiple text files