public class SolrSearchResult extends java.lang.Object implements SearchResult, java.io.Serializable
| Constructor and Description |
|---|
SolrSearchResult() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFacet(Facet facet) |
boolean |
containsFacet(java.lang.String name)
Checks if the specified name is a facet.
|
java.util.Map<java.lang.String,java.lang.Object> |
getAttributes()
Returns attributes for the current search result.
|
java.util.List<IndexedTypeSort> |
getAvailableNamedSorts()
Return list of available named sorts.
|
java.util.List<Breadcrumb> |
getBreadcrumbs()
Return bread-crumbs for the current search result state.
|
protected Converter |
getConverter(ConverterType converterType) |
ConvertersMapping |
getConvertersMapping() |
IndexedTypeSort |
getCurrentNamedSort()
Return currently selected sort.
|
java.util.List<Document> |
getDocuments()
Returns the document that represent the main results.
|
Facet |
getFacet(java.lang.String name)
Searches for the root of a facet tree which contains the Facet and all FacetValues, for example,
manufacturers(Facet) contains [eizo, ati, ..](FacetValue)
|
java.util.Set<java.lang.String> |
getFacetNames()
Searches for all root facet names.
|
java.util.List<Facet> |
getFacets()
Searches for all available facets which contain the whole tree,
manufacturers [eizo, ati, ..], prices [100-499,500-999],categories [online, staged]
|
FacetSearchConfig |
getFacetSearchConfig() |
java.util.Map<java.lang.String,Facet> |
getFacetsMap() |
java.util.List<SearchResultGroupCommand> |
getGroupCommands()
Returns the group results.
|
java.util.List<java.lang.String> |
getIdentifiers()
Searches for the identifiers saved in the index, for example, "sony_online", "ati_staged", or "just_name"
|
IndexedType |
getIndexedType() |
java.util.List<KeywordRedirectValue> |
getKeywordRedirects() |
protected ModelLoader |
getModelLoader(IndexedType indexType) |
long |
getNumberOfPages()
Use for pagination
|
long |
getNumberOfResults()
Returns the number of results.
|
int |
getOffset()
Use for pagination
|
int |
getPageSize()
Use for pagination
|
SearchQueryInfo |
getQueryInfo()
Statistics Info about the Search Query - usable for logging
|
QueryResponse |
getQueryResponse() |
java.util.List<java.lang.String> |
getResultCodes()
Searches for item's codes.
|
<T> java.util.List<T> |
getResultData(ConverterType converterType)
Returns SOLR results in form of a simple data objects (DTO's)
|
java.util.List<PK> |
getResultPKs()
Searches for all result PKs.
|
java.util.List<? extends ItemModel> |
getResults()
Searches for all result items.
|
SearchQuery |
getSearchQuery() |
java.util.List<SolrDocument> |
getSolrDocuments() |
QueryResponse |
getSolrObject()
Searches for the underlying implementation.
|
java.lang.String |
getSpellingSuggestion()
Get the best suggestion from the spellchecker.
|
boolean |
hasNext()
Use for pagination
|
boolean |
hasPrevious()
Use for pagination
|
void |
setAvailableNamedSorts(java.util.List<IndexedTypeSort> availableNamedSorts) |
void |
setBreadcrumbs(java.util.List<Breadcrumb> breadcrumbs) |
void |
setConvertersMapping(ConvertersMapping convertersMapping) |
void |
setCurrentNamedSort(IndexedTypeSort currentNamedSort) |
void |
setDocuments(java.util.List<Document> documents) |
void |
setFacetsMap(java.util.Map<java.lang.String,Facet> facets) |
void |
setGroupCommands(java.util.List<SearchResultGroupCommand> groupCommands) |
void |
setKeywordRedirects(java.util.List<KeywordRedirectValue> keywordRedirects) |
void |
setNumberOfResults(long numberOfResults) |
void |
setQueryResponse(QueryResponse queryResponse) |
void |
setSearchQuery(SearchQuery searchQuery) |
void |
setSolrDocuments(java.util.List<SolrDocument> solrDocuments) |
public ConvertersMapping getConvertersMapping()
public void setConvertersMapping(ConvertersMapping convertersMapping)
public SearchQuery getSearchQuery()
public void setSearchQuery(SearchQuery searchQuery)
public QueryResponse getQueryResponse()
public void setQueryResponse(QueryResponse queryResponse)
public long getNumberOfResults()
SearchResultgetNumberOfResults in interface SearchResultpublic void setNumberOfResults(long numberOfResults)
public java.util.List<Document> getDocuments()
SearchResultgetDocuments in interface SearchResultpublic void setDocuments(java.util.List<Document> documents)
public java.util.List<SolrDocument> getSolrDocuments()
public void setSolrDocuments(java.util.List<SolrDocument> solrDocuments)
public java.util.List<SearchResultGroupCommand> getGroupCommands()
SearchResultgetGroupCommands in interface SearchResultpublic void setGroupCommands(java.util.List<SearchResultGroupCommand> groupCommands)
public java.util.Map<java.lang.String,Facet> getFacetsMap()
public void setFacetsMap(java.util.Map<java.lang.String,Facet> facets)
public java.util.List<Breadcrumb> getBreadcrumbs()
SearchResultgetBreadcrumbs in interface SearchResultBreadcrumbpublic void setBreadcrumbs(java.util.List<Breadcrumb> breadcrumbs)
public java.util.List<KeywordRedirectValue> getKeywordRedirects()
getKeywordRedirects in interface SearchResultpublic java.util.List<IndexedTypeSort> getAvailableNamedSorts()
SearchResultgetAvailableNamedSorts in interface SearchResultIndexedTypeSortpublic void setAvailableNamedSorts(java.util.List<IndexedTypeSort> availableNamedSorts)
public IndexedTypeSort getCurrentNamedSort()
SearchResultgetCurrentNamedSort in interface SearchResultpublic void setCurrentNamedSort(IndexedTypeSort currentNamedSort)
public void setKeywordRedirects(java.util.List<KeywordRedirectValue> keywordRedirects)
public FacetSearchConfig getFacetSearchConfig()
public IndexedType getIndexedType()
public int getOffset()
SearchResultgetOffset in interface SearchResultpublic int getPageSize()
SearchResultgetPageSize in interface SearchResultpublic boolean hasNext()
SearchResulthasNext in interface SearchResultpublic boolean hasPrevious()
SearchResulthasPrevious in interface SearchResultpublic long getNumberOfPages()
SearchResultgetNumberOfPages in interface SearchResultpublic java.util.List<java.lang.String> getIdentifiers()
SearchResultgetIdentifiers in interface SearchResultpublic java.util.List<PK> getResultPKs() throws FacetSearchException
SearchResultgetResultPKs in interface SearchResultFacetSearchExceptionpublic java.util.List<java.lang.String> getResultCodes()
throws FacetSearchException
SearchResultgetResultCodes in interface SearchResultFacetSearchExceptionpublic java.util.List<? extends ItemModel> getResults() throws FacetSearchException
SearchResultgetResults in interface SearchResultFacetSearchExceptionpublic <T> java.util.List<T> getResultData(ConverterType converterType)
SearchResultgetResultData in interface SearchResultjava.lang.IllegalStateException - when no converter was registered for result type or query was not passed in the constructorpublic void addFacet(Facet facet)
public java.util.Set<java.lang.String> getFacetNames()
SearchResultgetFacetNames in interface SearchResultpublic boolean containsFacet(java.lang.String name)
SearchResultcontainsFacet in interface SearchResultname - name of the root facetpublic Facet getFacet(java.lang.String name)
SearchResultgetFacet in interface SearchResultname - name of the facetpublic java.util.List<Facet> getFacets()
SearchResultgetFacets in interface SearchResultpublic java.lang.String getSpellingSuggestion()
SearchResultgetSpellingSuggestion in interface SearchResultpublic SearchQueryInfo getQueryInfo()
SearchResultgetQueryInfo in interface SearchResultpublic QueryResponse getSolrObject()
SearchResultgetSolrObject in interface SearchResultpublic java.util.Map<java.lang.String,java.lang.Object> getAttributes()
SearchResultgetAttributes in interface SearchResultprotected Converter getConverter(ConverterType converterType)
protected ModelLoader getModelLoader(IndexedType indexType)
Copyright © 2018 SAP SE. All Rights Reserved.