* make it clear that localSearch results are first and preferred over apiSearch results

This commit is contained in:
Reinhard Pointner 2016-01-20 12:50:51 +00:00
parent 1f5b3d21dd
commit 8770cddaa5
1 changed files with 1 additions and 1 deletions

View File

@ -149,8 +149,8 @@ public final class WebServices {
@Override
public List<SearchResult> fetchSearchResult(final String query, final Locale locale) throws Exception {
Callable<List<SearchResult>> apiSearch = () -> TheTVDBClientWithLocalSearch.super.fetchSearchResult(query, locale);
Callable<List<SearchResult>> localSearch = () -> getLocalIndex().search(query);
Callable<List<SearchResult>> apiSearch = () -> TheTVDBClientWithLocalSearch.super.fetchSearchResult(query, locale);
Set<SearchResult> results = new LinkedHashSet<SearchResult>();
for (Future<List<SearchResult>> resultSet : requestThreadPool.invokeAll(asList(localSearch, apiSearch))) {