The task was to write, in Scala:
- an indexer that scans a bunch of input files, and
- a searcher that takes a query string and returns a list of lines containing it
It can be solved using the following:
In the indexer, tokenize each document, and create an inverted index …