org.springframework.data.solr.core.query.result
Class SolrResultPage<T>
java.lang.Object
org.springframework.data.domain.PageImpl<T>
org.springframework.data.solr.core.query.result.SolrResultPage<T>
- All Implemented Interfaces:
- Serializable, Iterable<T>, Page<T>, Slice<T>, FacetPage<T>, HighlightPage<T>, ScoredPage<T>
public class SolrResultPage<T>
- extends PageImpl<T>
- implements FacetPage<T>, HighlightPage<T>, ScoredPage<T>
Base implementation of page holding solr response entities.
- Author:
- Christoph Strobl, Francisco Spaeth
- See Also:
- Serialized Form
| Methods inherited from class org.springframework.data.domain.PageImpl |
equals, getTotalElements, getTotalPages, hashCode, hasNext, hasNextPage, hasPreviousPage, isFirstPage, isLast, isLastPage, toString |
| Methods inherited from interface org.springframework.data.domain.Slice |
getContent, getNumber, getNumberOfElements, getSize, getSort, hasContent, hasNext, hasPrevious, isFirst, isLast, nextPageable, previousPageable |
SolrResultPage
public SolrResultPage(List<T> content)
SolrResultPage
public SolrResultPage(List<T> content,
Pageable pageable,
long total,
Float maxScore)
getFacetResultPage
public final Page<FacetFieldEntry> getFacetResultPage(String fieldname)
- Description copied from interface:
FacetPage
- Get Facet results for field with given name
- Specified by:
getFacetResultPage in interface FacetPage<T>
- Parameters:
fieldname - must not be null
- Returns:
getFacetResultPage
public final Page<FacetFieldEntry> getFacetResultPage(Field field)
- Description copied from interface:
FacetPage
- Get Facet results for field with given field
- Specified by:
getFacetResultPage in interface FacetPage<T>
- Returns:
getPivot
public List<FacetPivotFieldEntry> getPivot(String fieldName)
- Description copied from interface:
FacetPage
- Get Facet Pivot results for fields with given fields.
- Specified by:
getPivot in interface FacetPage<T>
- Returns:
getPivot
public List<FacetPivotFieldEntry> getPivot(PivotField field)
- Description copied from interface:
FacetPage
- Get Facet Pivot results for fields with given fields.
- Specified by:
getPivot in interface FacetPage<T>
- Returns:
addFacetResultPage
public final void addFacetResultPage(Page<FacetFieldEntry> page,
Field field)
addFacetPivotResultPage
public final void addFacetPivotResultPage(List<FacetPivotFieldEntry> result,
PivotField field)
addAllFacetFieldResultPages
public void addAllFacetFieldResultPages(Map<Field,Page<FacetFieldEntry>> pageMap)
addAllFacetPivotFieldResult
public void addAllFacetPivotFieldResult(Map<PivotField,List<FacetPivotFieldEntry>> resultMap)
getFacetResultPages
public Collection<Page<FacetFieldEntry>> getFacetResultPages()
- Specified by:
getFacetResultPages in interface FacetPage<T>
- Returns:
- Collection holding faceting result pages
setFacetQueryResultPage
public final void setFacetQueryResultPage(List<FacetQueryEntry> facetQueryResult)
getFacetQueryResult
public Page<FacetQueryEntry> getFacetQueryResult()
- Specified by:
getFacetQueryResult in interface FacetPage<T>
- Returns:
- empty collection if not set
getFacetFields
public Collection<Field> getFacetFields()
- Description copied from interface:
FacetPage
- Get Fields contained in Result.
- Specified by:
getFacetFields in interface FacetPage<T>
- Returns:
getFacetPivotFields
public Collection<PivotField> getFacetPivotFields()
- Description copied from interface:
FacetPage
- Get Pivot Fields contained in Result.
- Specified by:
getFacetPivotFields in interface FacetPage<T>
- Returns:
getAllFacets
public Collection<Page<? extends FacetEntry>> getAllFacets()
- Specified by:
getAllFacets in interface FacetPage<T>
- Returns:
- empty collection if not available
getHighlighted
public List<HighlightEntry<T>> getHighlighted()
- Specified by:
getHighlighted in interface HighlightPage<T>
- Returns:
- empty list of not set
setHighlighted
public void setHighlighted(List<HighlightEntry<T>> highlighted)
getHighlights
public List<HighlightEntry.Highlight> getHighlights(T entity)
- Specified by:
getHighlights in interface HighlightPage<T>
- Returns:
- empty list if none found
getMaxScore
public Float getMaxScore()
- Description copied from interface:
ScoredPage
- Returns the scoring of the topmost document (max score).
- Specified by:
getMaxScore in interface ScoredPage<T>
- Returns:
Copyright © 2011-2014-2014 Pivotal Software, Inc.. All Rights Reserved.