Interface SearchResultsService
-
- All Known Implementing Classes:
SearchResultsServiceImpl
@ProviderType public interface SearchResultsService
This service hides the interaction between the GraphQL backend and the Sling component models. It's job is to performa a search, given a particular search query and filters.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SearchResultsSet
performSearch(SearchOptions searchOptions, org.apache.sling.api.resource.Resource resource, com.day.cq.wcm.api.Page productPage, org.apache.sling.api.SlingHttpServletRequest request)
Perform a search against the commerce backend and return aSearchResultsSet
for consumption by the frontend.SearchResultsSet
performSearch(SearchOptions searchOptions, org.apache.sling.api.resource.Resource resource, com.day.cq.wcm.api.Page productPage, org.apache.sling.api.SlingHttpServletRequest request, Consumer<com.adobe.cq.commerce.magento.graphql.ProductInterfaceQuery> productQueryHook)
Perform a search against the commerce backend and return aSearchResultsSet
for consumption by the frontend.org.apache.commons.lang3.tuple.Pair<com.adobe.cq.commerce.magento.graphql.CategoryInterface,SearchResultsSet>
performSearch(SearchOptions searchOptions, org.apache.sling.api.resource.Resource resource, com.day.cq.wcm.api.Page productPage, org.apache.sling.api.SlingHttpServletRequest request, Consumer<com.adobe.cq.commerce.magento.graphql.ProductInterfaceQuery> productQueryHook, AbstractCategoryRetriever categoryRetriever)
Perform a search against the commerce backend and return aSearchResultsSet
for consumption by the frontend.
-
-
-
Method Detail
-
performSearch
@Nonnull SearchResultsSet performSearch(SearchOptions searchOptions, org.apache.sling.api.resource.Resource resource, com.day.cq.wcm.api.Page productPage, org.apache.sling.api.SlingHttpServletRequest request)
Perform a search against the commerce backend and return aSearchResultsSet
for consumption by the frontend. When the search is performed the implementing concrete classes are responsible for correctly applying the provided filters.- Parameters:
searchOptions
- the search options for thigns like filters, query, etcresource
- resource for adaptionproductPage
- product page to provide context to the search servicerequest
- the original request object- Returns:
- a
SearchResultsSet
with search results and metadata
-
performSearch
@Nonnull SearchResultsSet performSearch(SearchOptions searchOptions, org.apache.sling.api.resource.Resource resource, com.day.cq.wcm.api.Page productPage, org.apache.sling.api.SlingHttpServletRequest request, Consumer<com.adobe.cq.commerce.magento.graphql.ProductInterfaceQuery> productQueryHook)
Perform a search against the commerce backend and return aSearchResultsSet
for consumption by the frontend. When the search is performed the implementing concrete classes are responsible for correctly applying the provided filters. This method allows an override query hook to be provided.- Parameters:
searchOptions
- the search options for thigns like filters, query, etcresource
- resource for adaptionproductPage
- product page to provide context to the search servicerequest
- the original request objectproductQueryHook
- an optional query hook parameter- Returns:
- a
SearchResultsSet
with search results and metadata
-
performSearch
org.apache.commons.lang3.tuple.Pair<com.adobe.cq.commerce.magento.graphql.CategoryInterface,SearchResultsSet> performSearch(SearchOptions searchOptions, org.apache.sling.api.resource.Resource resource, com.day.cq.wcm.api.Page productPage, org.apache.sling.api.SlingHttpServletRequest request, Consumer<com.adobe.cq.commerce.magento.graphql.ProductInterfaceQuery> productQueryHook, AbstractCategoryRetriever categoryRetriever)
Perform a search against the commerce backend and return aSearchResultsSet
for consumption by the frontend. When the search is performed the implementing concrete classes are responsible for correctly applying the provided filters. This method allows an override query hook to be provided together with a category retriever. If the category retriever is null, the left part of the result pair will be null;- Parameters:
searchOptions
- the search options for thigns like filters, query, etcresource
- resource for adaptionproductPage
- product page to provide context to the search servicerequest
- the original request objectproductQueryHook
- an optional query hook parametercategoryRetriever
- an optional category retriever parameter- Returns:
- a
SearchResultsSet
with search results and metadata
-
-