Class SolrSearchResult
java.lang.Object
de.hybris.platform.solrfacetsearch.search.impl.SolrSearchResult
- All Implemented Interfaces:
SearchResult,Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancontainsFacet(String name) Checks if the specified name is a facet.Returns attributes for the current search result.Return list of available named sorts.Return bread-crumbs for the current search result state.protected ConvertergetConverter(ConverterType converterType) Return currently selected sort.Returns the document that represent the main results.Searches for the root of a facet tree which contains the Facet and all FacetValues, for example, manufacturers(Facet) contains [eizo, ati, ..](FacetValue)Searches for all root facet names.Searches for all available facets which contain the whole tree, manufacturers [eizo, ati, ..], prices [100-499,500-999],categories [online, staged]Returns the group command result.Returns the group results.Searches for the identifiers saved in the index, for example, "sony_online", "ati_staged", or "just_name"protected ModelLoadergetModelLoader(IndexedType indexType) longUse for paginationlongReturns the number of results.intUse for paginationintUse for paginationStatistics Info about the Search Query - usable for loggingorg.apache.solr.client.solrj.response.QueryResponseSearches for item's codes.<T> List<T>getResultData(ConverterType converterType) Returns SOLR results in form of a simple data objects (DTO's)Searches for all result PKs.Searches for all result items.List<org.apache.solr.common.SolrDocument>org.apache.solr.client.solrj.response.QueryResponseSearches for the underlying implementation.Get the best suggestion from the spellchecker.booleanhasNext()Use for paginationbooleanUse for paginationvoidsetAvailableNamedSorts(List<IndexedTypeSort> availableNamedSorts) voidsetBreadcrumbs(List<Breadcrumb> breadcrumbs) voidsetConvertersMapping(ConvertersMapping convertersMapping) voidsetCurrentNamedSort(IndexedTypeSort currentNamedSort) voidsetDocuments(List<Document> documents) voidsetFacetsMap(Map<String, Facet> facets) voidsetGroupCommandResult(SearchResultGroupCommand groupCommandResult) Sets the group command result.voidsetGroupCommands(List<SearchResultGroupCommand> groupCommands) voidsetKeywordRedirects(List<KeywordRedirectValue> keywordRedirects) voidsetNumberOfResults(long numberOfResults) voidsetQueryResponse(org.apache.solr.client.solrj.response.QueryResponse queryResponse) voidsetSearchQuery(SearchQuery searchQuery) voidsetSolrDocuments(List<org.apache.solr.common.SolrDocument> solrDocuments)
-
Constructor Details
-
SolrSearchResult
public SolrSearchResult()
-
-
Method Details
-
getConvertersMapping
-
setConvertersMapping
-
getSearchQuery
-
setSearchQuery
-
getQueryResponse
public org.apache.solr.client.solrj.response.QueryResponse getQueryResponse() -
setQueryResponse
public void setQueryResponse(org.apache.solr.client.solrj.response.QueryResponse queryResponse) -
getNumberOfResults
public long getNumberOfResults()Description copied from interface:SearchResultReturns the number of results. If result grouping is being used, this is the number of groups.- Specified by:
getNumberOfResultsin interfaceSearchResult- Returns:
- the number of results
-
setNumberOfResults
public void setNumberOfResults(long numberOfResults) -
getDocuments
Description copied from interface:SearchResultReturns the document that represent the main results.- Specified by:
getDocumentsin interfaceSearchResult- Returns:
- the documents
-
setDocuments
-
getSolrDocuments
-
setSolrDocuments
-
setGroupCommandResult
Description copied from interface:SearchResultSets the group command result.- Specified by:
setGroupCommandResultin interfaceSearchResult- Parameters:
groupCommandResult- - the group command result
-
getGroupCommandResult
Description copied from interface:SearchResultReturns the group command result.- Specified by:
getGroupCommandResultin interfaceSearchResult- Returns:
- the group command result
-
getGroupCommands
Description copied from interface:SearchResultReturns the group results.- Specified by:
getGroupCommandsin interfaceSearchResult- Returns:
- the group results
-
setGroupCommands
-
getFacetsMap
-
setFacetsMap
-
getBreadcrumbs
Description copied from interface:SearchResultReturn bread-crumbs for the current search result state.- Specified by:
getBreadcrumbsin interfaceSearchResult- Returns:
- List of
Breadcrumb
-
setBreadcrumbs
-
getKeywordRedirects
- Specified by:
getKeywordRedirectsin interfaceSearchResult
-
getAvailableNamedSorts
Description copied from interface:SearchResultReturn list of available named sorts.- Specified by:
getAvailableNamedSortsin interfaceSearchResult- Returns:
- List of
IndexedTypeSort
-
setAvailableNamedSorts
-
getCurrentNamedSort
Description copied from interface:SearchResultReturn currently selected sort.- Specified by:
getCurrentNamedSortin interfaceSearchResult- Returns:
- current sort
-
setCurrentNamedSort
-
setKeywordRedirects
-
getFacetSearchConfig
-
getIndexedType
-
getOffset
public int getOffset()Description copied from interface:SearchResultUse for pagination- Specified by:
getOffsetin interfaceSearchResult- Returns:
- the offset of the pages, 0 for the first page, 1 for the second, and so on
-
getPageSize
public int getPageSize()Description copied from interface:SearchResultUse for pagination- Specified by:
getPageSizein interfaceSearchResult- Returns:
- size of the page
-
hasNext
public boolean hasNext()Description copied from interface:SearchResultUse for pagination- Specified by:
hasNextin interfaceSearchResult- Returns:
- true if the next page is available, false otherwise.
-
hasPrevious
public boolean hasPrevious()Description copied from interface:SearchResultUse for pagination- Specified by:
hasPreviousin interfaceSearchResult- Returns:
- true if the previous page is available, false otherwise.
-
getNumberOfPages
public long getNumberOfPages()Description copied from interface:SearchResultUse for pagination- Specified by:
getNumberOfPagesin interfaceSearchResult- Returns:
- number of pages
-
getIdentifiers
Description copied from interface:SearchResultSearches for the identifiers saved in the index, for example, "sony_online", "ati_staged", or "just_name"- Specified by:
getIdentifiersin interfaceSearchResult- Returns:
- collection of all identifiers
-
getResultPKs
Description copied from interface:SearchResultSearches for all result PKs.- Specified by:
getResultPKsin interfaceSearchResult- Returns:
- resulting items PK
- Throws:
FacetSearchException
-
getResultCodes
Description copied from interface:SearchResultSearches for item's codes.- Specified by:
getResultCodesin interfaceSearchResult- Returns:
- List items codes as Strings
- Throws:
FacetSearchException
-
getResults
Description copied from interface:SearchResultSearches for all result items. Example, [product_01, product_02], or [cms_01, cms_02, cms_03]- Specified by:
getResultsin interfaceSearchResult- Returns:
- all items
- Throws:
FacetSearchException
-
getResultData
Description copied from interface:SearchResultReturns SOLR results in form of a simple data objects (DTO's)- Specified by:
getResultDatain interfaceSearchResult- Returns:
- unmodifiable, lazy list of search result DTO's
- Throws:
IllegalStateException- when no converter was registered for result type or query was not passed in the constructor
-
addFacet
-
getFacetNames
Description copied from interface:SearchResultSearches for all root facet names. Example: [manufacturers, prices, categories]- Specified by:
getFacetNamesin interfaceSearchResult- Returns:
- all root facet names
-
containsFacet
Description copied from interface:SearchResultChecks if the specified name is a facet. For example, manufacturers --> true, admin --> false- Specified by:
containsFacetin interfaceSearchResult- Parameters:
name- name of the root facet- Returns:
- true if found, false otherwise
-
getFacet
Description copied from interface:SearchResultSearches for the root of a facet tree which contains the Facet and all FacetValues, for example, manufacturers(Facet) contains [eizo, ati, ..](FacetValue)- Specified by:
getFacetin interfaceSearchResult- Parameters:
name- name of the facet- Returns:
- found facet or null when facet with given name is not available
-
getFacets
Description copied from interface:SearchResultSearches for all available facets which contain the whole tree, manufacturers [eizo, ati, ..], prices [100-499,500-999],categories [online, staged]- Specified by:
getFacetsin interfaceSearchResult- Returns:
- all available facets
-
getSpellingSuggestion
Description copied from interface:SearchResultGet the best suggestion from the spellchecker. Returns null if spell checker is not enabled, or no better suggestion than the user's query is found. Requires the UserQuery to be set on the SearchQuery.- Specified by:
getSpellingSuggestionin interfaceSearchResult
-
getQueryInfo
Description copied from interface:SearchResultStatistics Info about the Search Query - usable for logging- Specified by:
getQueryInfoin interfaceSearchResult
-
getSolrObject
public org.apache.solr.client.solrj.response.QueryResponse getSolrObject()Description copied from interface:SearchResultSearches for the underlying implementation.- Specified by:
getSolrObjectin interfaceSearchResult- Returns:
- The result object of the underlying implementation.
-
getAttributes
Description copied from interface:SearchResultReturns attributes for the current search result.- Specified by:
getAttributesin interfaceSearchResult- Returns:
- the attributes
-
getConverter
-
getModelLoader
-