Class SearchResultsServiceImpl

    • 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 a SearchResultsSet 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 interface SearchResultsService
        Parameters:
        searchOptions - the search options for thigns like filters, query, etc
        resource - resource for adaption
        productPage - product page to provide context to the search service
        request - 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 a SearchResultsSet 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 interface SearchResultsService
        Parameters:
        searchOptions - the search options for thigns like filters, query, etc
        resource - resource for adaption
        productPage - product page to provide context to the search service
        request - the original request object
        productQueryHook - 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 a SearchResultsSet 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 interface SearchResultsService
        Parameters:
        searchOptions - the search options for thigns like filters, query, etc
        resource - resource for adaption
        productPage - product page to provide context to the search service
        request - the original request object
        productQueryHook - an optional query hook parameter
        categoryRetriever - an optional category retriever parameter
        Returns:
        a SearchResultsSet with search results and metadata