public SearchResult searchFilter(List<String> sections, String text, int start,
int count, int textSize) {
String query = text.toLowerCase();
String language = getBusiness().getLanguage();
String defaultLanguage = getBusiness().getDefaultLanguage();
SearchResult result = getBusiness().getSearchEngine().search(
new SectionSearchFilter(sections),
query, start, count, language, textSize);
if (!language.equals(defaultLanguage)) {
SearchResult enResult = getBusiness().getSearchEngine().search(
new SectionSearchFilter(sections),
query, start, count, defaultLanguage, textSize);
for (Hit hit : enResult.getHits()) {
hit.setLocalTitle(hit.getTitle());
hit.setUrl(hit.getUrl() + "?language=" + defaultLanguage);
}
result.setCount(result.getCount() + enResult.getCount());
result.getHits().addAll(enResult.getHits());
}
return result;
}