Builds an inverted index based on corpus. Then outputs the x most relevant docs for a given query.