Class DefaultSolrKeywordRedirectService
java.lang.Object
de.hybris.platform.solrfacetsearch.search.impl.DefaultSolrKeywordRedirectService
- All Implemented Interfaces:
SolrKeywordRedirectService
Default implementation for
SolrKeywordRedirectService-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattachKeywordRedirect(SolrSearchResult searchResult) Attach keyword redirects to aSolrSearchResult.protected List<SolrFacetSearchKeywordRedirectModel>findKeywordRedirects(SearchQuery searchQuery) getKeywordRedirect(SearchQuery query) Get keyword redirect for given query.protected List<KeywordRedirectValue>protected voidhandleKeywordMatch(List<KeywordRedirectValue> result, String theQuery, SolrFacetSearchKeywordRedirectModel redirect) voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetKeywordRedirectSorter(KeywordRedirectSorter keywordRedirectSorter) voidsetRedirectHandlers(Map<KeywordRedirectMatchType, KeywordRedirectHandler> redirectHandlers) voidsetSolrFacetSearchKeywordDao(SolrFacetSearchKeywordDao solrFacetSearchKeywordDao)
-
Constructor Details
-
DefaultSolrKeywordRedirectService
public DefaultSolrKeywordRedirectService()
-
-
Method Details
-
getKeywordRedirect
Description copied from interface:SolrKeywordRedirectServiceGet keyword redirect for given query. The redirects should be sorted by usingKeywordRedirectSorter.- Specified by:
getKeywordRedirectin interfaceSolrKeywordRedirectService- Parameters:
query- used to find redirects.- Returns:
- List of
KeywordRedirectValue
-
attachKeywordRedirect
Description copied from interface:SolrKeywordRedirectServiceAttach keyword redirects to aSolrSearchResult. It useSolrKeywordRedirectService.getKeywordRedirect(SearchQuery)to get the list of keywords. If keywords exists in the result new ones will be added and whole list will be sorted.- Specified by:
attachKeywordRedirectin interfaceSolrKeywordRedirectService- Parameters:
searchResult- result to attach redirects.- Returns:
SolrSearchResultwith attached keyword redirects.
-
getSingleKeywordRedirect
-
findKeywordRedirects
-
handleKeywordMatch
protected void handleKeywordMatch(List<KeywordRedirectValue> result, String theQuery, SolrFacetSearchKeywordRedirectModel redirect) -
setSolrFacetSearchKeywordDao
-
setCommonI18NService
-
setRedirectHandlers
public void setRedirectHandlers(Map<KeywordRedirectMatchType, KeywordRedirectHandler> redirectHandlers) -
setKeywordRedirectSorter
-