Creates a search engine out of a set of documents.