Interface ProductSearchStrategy<STATE,ITEM,SEARCH_RESULT extends ProductSearchPageData<STATE,ITEM>,AUTOCOMPLETE_RESULT extends AutocompleteSuggestion>
- Type Parameters:
STATE- The type of the search query state. This is implementation specific. For exampleSolrSearchQueryDataITEM- The type of items returned as part of the search results. For exampleSearchResultValueDataSEARCH_RESULT- The type of the search page data returned. Must be (or extend)ProductSearchPageData.AUTOCOMPLETE_RESULT- The type of the result data structure containing the returned suggestions
- All Known Subinterfaces:
SolrFacetSearchProductSearchStrategy<ITEM>
- All Known Implementing Classes:
DefaultSearchServicesProductSearchStrategy,DefaultSolrFacetSearchProductSearchStrategy
public interface ProductSearchStrategy<STATE,ITEM,SEARCH_RESULT extends ProductSearchPageData<STATE,ITEM>,AUTOCOMPLETE_RESULT extends AutocompleteSuggestion>
ProductSearchStrategy interface.
Abstraction for different product search implementations.
-
Method Summary
Modifier and TypeMethodDescriptioncategorySearch(String categoryCode, SearchQueryContext searchQueryContext, PageableData pageableData) Initiate a new search in category in a search query context.categorySearch(String categoryCode, PageableData pageableData) Initiate a new search in category.getAutocompleteSuggestions(String input) Get the auto complete suggestions for the input provided.getIndexTypes(String baseSiteId, String catalogId, String catalogVersion) Get the index types for baseSiteId, catalogId and catalogversionsearchAgain(STATE searchQueryData, PageableData pageableData) Refine an exiting search.textSearch(String text, SearchQueryContext searchQueryContext, PageableData pageableData) Initiate a new search using simple free text query in a search query context.textSearch(String text, PageableData pageableData) Initiate a new search using simple free text query.
-
Method Details
-
textSearch
Initiate a new search using simple free text query.- Parameters:
text- the search textpageableData- the page to return, can be null to use defaults- Returns:
- the search results
-
textSearch
SEARCH_RESULT textSearch(String text, SearchQueryContext searchQueryContext, PageableData pageableData) Initiate a new search using simple free text query in a search query context.- Parameters:
text- the search textsearchQueryContext- search query contextpageableData- the page to return, can be null to use defaults- Returns:
- the search results
-
categorySearch
Initiate a new search in category.- Parameters:
categoryCode- the code for category to search inpageableData- the page to return, can be null to use defaults- Returns:
- the search results
-
categorySearch
SEARCH_RESULT categorySearch(String categoryCode, SearchQueryContext searchQueryContext, PageableData pageableData) Initiate a new search in category in a search query context.- Parameters:
categoryCode- the code for category to search insearchQueryContext- search query contextpageableData- the page to return, can be null to use defaults- Returns:
- the search results
-
searchAgain
Refine an exiting search. The query object allows more complex queries using facet selection. The SearchQueryData must have been obtained from the results of a call to eithertextSearch(String, PageableData)orcategorySearch(String, PageableData).- Parameters:
searchQueryData- the search query objectpageableData- the page to return- Returns:
- the search results
-
getAutocompleteSuggestions
Get the auto complete suggestions for the input provided.- Parameters:
input- the user's input on which the autocomplete is based- Returns:
- a list of suggested search terms
-
getIndexTypes
Get the index types for baseSiteId, catalogId and catalogversion- Parameters:
baseSiteId- the base site identifiercatalogId- the catalog identifiercatalogVersion- the catalog version- Returns:
- a list of suggested search terms
-