Class SearchResultsServiceImpl
- java.lang.Object
-
- com.adobe.cq.commerce.core.search.internal.services.SearchResultsServiceImpl
-
- All Implemented Interfaces:
SearchResultsService
public class SearchResultsServiceImpl extends Object implements SearchResultsService
-
-
Constructor Summary
Constructors Constructor Description SearchResultsServiceImpl()
SearchResultsServiceImpl(MagentoGraphqlClient magentoGraphqlClient)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
SearchResultsServiceImpl
public SearchResultsServiceImpl()
-
SearchResultsServiceImpl
public SearchResultsServiceImpl(MagentoGraphqlClient magentoGraphqlClient)
-
-
Method Detail
-
performSearch
@Nonnull public SearchResultsSet performSearch(SearchOptions searchOptions, org.apache.sling.api.resource.Resource resource, com.day.cq.wcm.api.Page productPage, org.apache.sling.api.SlingHttpServletRequest request)
Description copied from interface:SearchResultsService
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.- Specified by:
performSearch
in interfaceSearchResultsService
- 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 public 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)
Description copied from interface:SearchResultsService
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.- Specified by:
performSearch
in interfaceSearchResultsService
- 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
@Nonnull public 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)
Description copied from interface:SearchResultsService
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;- Specified by:
performSearch
in interfaceSearchResultsService
- 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
-
-