List of usage examples for org.springframework.data.solr.core.query.result SolrResultPage getSize
int getSize();
From source file:org.springframework.data.solr.core.ResultHelper.java
static <T> List<HighlightEntry<T>> convertAndAddHighlightQueryResponseToResultPage(QueryResponse response, SolrResultPage<T> page) { if (response == null || MapUtils.isEmpty(response.getHighlighting()) || page == null) { return Collections.emptyList(); }/*from w w w . j a v a2 s.c o m*/ List<HighlightEntry<T>> mappedHighlights = new ArrayList<HighlightEntry<T>>(page.getSize()); Map<String, Map<String, List<String>>> highlighting = response.getHighlighting(); for (T item : page) { HighlightEntry<T> highlightEntry = processHighlightingForPageEntry(highlighting, item); mappedHighlights.add(highlightEntry); } page.setHighlighted(mappedHighlights); return mappedHighlights; }