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>,Supplier<Stream<T>>,org.springframework.data.domain.Page<T>,org.springframework.data.domain.Slice<T>,FacetAndHighlightPage<T>,FacetPage<T>,FacetQueryResult<T>,GroupPage<T>,HighlightPage<T>,HighlightQueryResult<T>,ScoredPage<T>,SpellcheckedPage<T>,SpellcheckQueryResult,StatsPage<T>,org.springframework.data.util.Streamable<T>
public class SolrResultPage<T>
extends org.springframework.data.domain.PageImpl<T>
implements FacetPage<T>, HighlightPage<T>, FacetAndHighlightPage<T>, ScoredPage<T>, GroupPage<T>, StatsPage<T>, SpellcheckedPage<T>
Base implementation of page holding solr response entities.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.data.solr.core.query.result.SpellcheckQueryResult
SpellcheckQueryResult.Alternative -
Constructor Summary
ConstructorsConstructorDescriptionSolrResultPage(List<T> content) SolrResultPage(List<T> content, org.springframework.data.domain.Pageable pageable, long total, Float maxScore) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAllFacetFieldResultPages(Map<Field, org.springframework.data.domain.Page<FacetFieldEntry>> pageMap) voidaddAllFacetPivotFieldResult(Map<PivotField, List<FacetPivotFieldEntry>> resultMap) voidaddAllRangeFacetFieldResultPages(Map<Field, org.springframework.data.domain.Page<FacetFieldEntry>> pageMap) final voidaddFacetPivotResultPage(List<FacetPivotFieldEntry> result, PivotField field) final voidaddFacetResultPage(org.springframework.data.domain.Page<FacetFieldEntry> page, Field field) final voidaddRangeFacetResultPage(org.springframework.data.domain.Page<FacetFieldEntry> page, Field field) voidaddSuggestions(String term, List<SpellcheckQueryResult.Alternative> suggestions) Collection<org.springframework.data.domain.Page<? extends FacetEntry>>Get allSpellcheckQueryResult.Alternatives;getAlternatives(String term) Get theSpellcheckQueryResult.Alternatives for a given term.getConvertedContent(Function<? super T, ? extends U> arg0) Get Fields contained in Result.Get Pivot Fields contained in Result.org.springframework.data.domain.Page<FacetQueryEntry>final org.springframework.data.domain.Page<FacetFieldEntry>getFacetResultPage(String fieldname) Get Facet results for field with given namefinal org.springframework.data.domain.Page<FacetFieldEntry>getFacetResultPage(Field field) Get Facet results for field with given fieldCollection<org.springframework.data.domain.Page<FacetFieldEntry>>getFieldStatsResult(String fieldName) Get the stats result done for the field with the given fieldName.getFieldStatsResult(Field field) Get the stats result done for the givenField.Get all field stats results for this page.getGroupResult(String name) Get a group result with the given name.getGroupResult(Field field) Get a group result done for the givenField.getGroupResult(Function function) Get a group result done for the givenFunction.getGroupResult(Query query) Get a group result done for the givenQuery.getHighlights(T entity) Returns the scoring of the topmost document (max score).intintorg.springframework.data.domain.PageableGet Facet Pivot results for fields with given fields.getPivot(PivotField field) Get Facet Pivot results for fields with given fields.final org.springframework.data.domain.Page<FacetFieldEntry>getRangeFacetResultPage(String fieldname) Get Range Facet results for field with given namefinal org.springframework.data.domain.Page<FacetFieldEntry>getRangeFacetResultPage(Field field) Get Range Facet results for a given field with given nameintgetSize()org.springframework.data.domain.SortgetSort()Get all suggestions.getSuggestions(String term) Get the suggestions for a given term.booleanbooleanbooleanisFirst()iterator()org.springframework.data.domain.Pageableorg.springframework.data.domain.Pageablefinal voidsetFacetQueryResultPage(List<FacetQueryEntry> facetQueryResult) voidsetFieldStatsResults(Map<String, FieldStatsResult> fieldStatsResults) voidsetGroupResults(Map<Object, GroupResult<T>> groupResults) voidsetHighlighted(List<HighlightEntry<T>> highlighted) Methods inherited from class org.springframework.data.domain.PageImpl
equals, getTotalElements, getTotalPages, hashCode, hasNext, isLast, map, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, iterator, spliteratorMethods inherited from interface org.springframework.data.domain.Page
getTotalElements, getTotalPages, mapMethods inherited from interface org.springframework.data.domain.Slice
getContent, getNumber, getNumberOfElements, getPageable, getSize, getSort, hasContent, hasNext, hasPrevious, isFirst, isLast, nextOrLastPageable, nextPageable, previousOrFirstPageable, previousPageableMethods inherited from interface org.springframework.data.util.Streamable
and, and, and, and, filter, flatMap, get, isEmpty, stream, toList, toSet
-
Constructor Details
-
SolrResultPage
-
SolrResultPage
-
-
Method Details
-
getFacetResultPage
public final org.springframework.data.domain.Page<FacetFieldEntry> getFacetResultPage(String fieldname) Description copied from interface:FacetQueryResultGet Facet results for field with given name- Specified by:
getFacetResultPagein interfaceFacetQueryResult<T>- Parameters:
fieldname- must not be null.- Returns:
-
getRangeFacetResultPage
public final org.springframework.data.domain.Page<FacetFieldEntry> getRangeFacetResultPage(String fieldname) Description copied from interface:FacetQueryResultGet Range Facet results for field with given name- Specified by:
getRangeFacetResultPagein interfaceFacetQueryResult<T>- Parameters:
fieldname- field name (must not be null)- Returns:
- facet range for the field name provided
-
getFacetResultPage
Description copied from interface:FacetQueryResultGet Facet results for field with given field- Specified by:
getFacetResultPagein interfaceFacetQueryResult<T>- Returns:
-
getRangeFacetResultPage
public final org.springframework.data.domain.Page<FacetFieldEntry> getRangeFacetResultPage(Field field) Description copied from interface:FacetQueryResultGet Range Facet results for a given field with given name- Specified by:
getRangeFacetResultPagein interfaceFacetQueryResult<T>- Returns:
- facet range page for the field provided
-
getPivot
Description copied from interface:FacetQueryResultGet Facet Pivot results for fields with given fields.- Specified by:
getPivotin interfaceFacetQueryResult<T>- Returns:
-
getPivot
Description copied from interface:FacetQueryResultGet Facet Pivot results for fields with given fields.- Specified by:
getPivotin interfaceFacetQueryResult<T>- Returns:
-
addFacetResultPage
public final void addFacetResultPage(org.springframework.data.domain.Page<FacetFieldEntry> page, Field field) -
addRangeFacetResultPage
public final void addRangeFacetResultPage(org.springframework.data.domain.Page<FacetFieldEntry> page, Field field) - Parameters:
page-field-- Since:
- 1.5
-
addFacetPivotResultPage
-
addAllFacetFieldResultPages
public void addAllFacetFieldResultPages(Map<Field, org.springframework.data.domain.Page<FacetFieldEntry>> pageMap) -
addAllRangeFacetFieldResultPages
public void addAllRangeFacetFieldResultPages(Map<Field, org.springframework.data.domain.Page<FacetFieldEntry>> pageMap) - Parameters:
pageMap-- Since:
- 1.5
-
addAllFacetPivotFieldResult
-
getFacetResultPages
- Specified by:
getFacetResultPagesin interfaceFacetQueryResult<T>- Returns:
- Collection holding faceting result pages
-
setFacetQueryResultPage
-
getFacetQueryResult
- Specified by:
getFacetQueryResultin interfaceFacetQueryResult<T>- Returns:
- empty collection if not set
-
getFacetFields
Description copied from interface:FacetQueryResultGet Fields contained in Result.- Specified by:
getFacetFieldsin interfaceFacetQueryResult<T>- Returns:
-
getFacetPivotFields
Description copied from interface:FacetQueryResultGet Pivot Fields contained in Result.- Specified by:
getFacetPivotFieldsin interfaceFacetQueryResult<T>- Returns:
-
getAllFacets
- Specified by:
getAllFacetsin interfaceFacetQueryResult<T>- Returns:
- empty collection if not available
-
getHighlighted
- Specified by:
getHighlightedin interfaceHighlightQueryResult<T>- Returns:
- empty list of not set
-
setHighlighted
-
getHighlights
- Specified by:
getHighlightsin interfaceHighlightQueryResult<T>- Returns:
- empty list if none found
-
setGroupResults
- Parameters:
groupResults-- Since:
- 1.4
-
getMaxScore
Description copied from interface:ScoredPageReturns the scoring of the topmost document (max score).- Specified by:
getMaxScorein interfaceScoredPage<T>- Returns:
-
getGroupResult
Description copied from interface:GroupPageGet a group result done for the givenField.- Specified by:
getGroupResultin interfaceGroupPage<T>- Returns:
-
getGroupResult
Description copied from interface:GroupPageGet a group result done for the givenFunction.- Specified by:
getGroupResultin interfaceGroupPage<T>- Returns:
-
getGroupResult
Description copied from interface:GroupPageGet a group result done for the givenQuery.- Specified by:
getGroupResultin interfaceGroupPage<T>- Returns:
-
getGroupResult
Description copied from interface:GroupPageGet a group result with the given name.- Specified by:
getGroupResultin interfaceGroupPage<T>- Returns:
-
setFieldStatsResults
- Since:
- 1.4
-
getFieldStatsResult
Description copied from interface:StatsPageGet the stats result done for the givenField.- Specified by:
getFieldStatsResultin interfaceStatsPage<T>- Returns:
-
getFieldStatsResult
Description copied from interface:StatsPageGet the stats result done for the field with the given fieldName.- Specified by:
getFieldStatsResultin interfaceStatsPage<T>- Returns:
-
getFieldStatsResults
Description copied from interface:StatsPageGet all field stats results for this page.- Specified by:
getFieldStatsResultsin interfaceStatsPage<T>- Returns:
-
getSuggestions
Description copied from interface:SpellcheckQueryResultGet the suggestions for a given term.- Specified by:
getSuggestionsin interfaceSpellcheckQueryResult- Parameters:
term- must not be null.- Returns:
- never null.
-
getSuggestions
Description copied from interface:SpellcheckQueryResultGet all suggestions.- Specified by:
getSuggestionsin interfaceSpellcheckQueryResult- Returns:
- never null.
-
addSuggestions
- Specified by:
addSuggestionsin interfaceSpellcheckQueryResult
-
getAlternatives
Description copied from interface:SpellcheckQueryResultGet allSpellcheckQueryResult.Alternatives;- Specified by:
getAlternativesin interfaceSpellcheckQueryResult- Returns:
- never null.
-
getAlternatives
Description copied from interface:SpellcheckQueryResultGet theSpellcheckQueryResult.Alternatives for a given term.- Specified by:
getAlternativesin interfaceSpellcheckQueryResult- Parameters:
term- must not be null.- Returns:
- never null.
-
getNumber
public int getNumber()- Specified by:
getNumberin interfaceorg.springframework.data.domain.Slice<T extends Object>
-
getSize
public int getSize()- Specified by:
getSizein interfaceorg.springframework.data.domain.Slice<T extends Object>
-
getNumberOfElements
public int getNumberOfElements()- Specified by:
getNumberOfElementsin interfaceorg.springframework.data.domain.Slice<T extends Object>
-
hasPrevious
public boolean hasPrevious()- Specified by:
hasPreviousin interfaceorg.springframework.data.domain.Slice<T extends Object>
-
isFirst
public boolean isFirst()- Specified by:
isFirstin interfaceorg.springframework.data.domain.Slice<T extends Object>
-
nextPageable
public org.springframework.data.domain.Pageable nextPageable()- Specified by:
nextPageablein interfaceorg.springframework.data.domain.Slice<T extends Object>
-
previousPageable
public org.springframework.data.domain.Pageable previousPageable()- Specified by:
previousPageablein interfaceorg.springframework.data.domain.Slice<T extends Object>
-
hasContent
public boolean hasContent()- Specified by:
hasContentin interfaceorg.springframework.data.domain.Slice<T extends Object>
-
getContent
- Specified by:
getContentin interfaceorg.springframework.data.domain.Slice<T extends Object>
-
getPageable
public org.springframework.data.domain.Pageable getPageable()- Specified by:
getPageablein interfaceorg.springframework.data.domain.Slice<T extends Object>
-
getSort
public org.springframework.data.domain.Sort getSort()- Specified by:
getSortin interfaceorg.springframework.data.domain.Slice<T extends Object>
-
iterator
-
getConvertedContent
-