Use a RepositorySearchResult

Fix up the tests