org.broadleafcommerce.core.search.service
Interface SearchService

All Known Implementing Classes:
DatabaseSearchServiceImpl, SolrSearchServiceImpl

public interface SearchService

Author:
Andre Azzolini (apazzolini)

Method Summary
 ProductSearchResult findExplicitProductsByCategory(Category category, ProductSearchCriteria searchCriteria)
          Performs a search for products in the given category, taking into consideration the ProductSearchCriteria This method will NOT return products that are in a sub-level of a given category.
 ProductSearchResult findProductsByCategory(Category category, ProductSearchCriteria searchCriteria)
          Performs a search for products in the given category, taking into consideration the ProductSearchCriteria This method will return products that are in any sub-level of a given category.
 ProductSearchResult findProductsByCategoryAndQuery(Category category, String query, ProductSearchCriteria searchCriteria)
          Performs a search for products in the given category for the given query, taking into consideration the ProductSearchCriteria
 ProductSearchResult findProductsByQuery(String query, ProductSearchCriteria searchCriteria)
          Performs a search for products across all categories for the given query, taking into consideration the ProductSearchCriteria
 List<SearchFacetDTO> getCategoryFacets(Category category)
          Gets all available facets for a given category
 List<SearchFacetDTO> getSearchFacets()
          Gets all available facets for search results page
 void rebuildIndex()
          This method delegates to SolrIndexService.rebuildIndex().
 

Method Detail

rebuildIndex

void rebuildIndex()
                  throws ServiceException,
                         IOException
This method delegates to SolrIndexService.rebuildIndex(). It is here to preserve backwards-compatibility with sites that were originally configured to run Broadleaf with Solr before 2.2.0.

Throws:
ServiceException
IOException

findProductsByCategory

ProductSearchResult findProductsByCategory(Category category,
                                           ProductSearchCriteria searchCriteria)
                                           throws ServiceException
Performs a search for products in the given category, taking into consideration the ProductSearchCriteria This method will return products that are in any sub-level of a given category. For example, if you had a "Routers" category and a "Enterprise Routers" sub-category, asking for products in "Routers", would return products that are in the "Enterprise Routers" category.

Parameters:
category -
searchCriteria -
Returns:
the result of the search
Throws:
ServiceException
See Also:
findExplicitProductsByCategory(Category, ProductSearchCriteria)

findExplicitProductsByCategory

ProductSearchResult findExplicitProductsByCategory(Category category,
                                                   ProductSearchCriteria searchCriteria)
                                                   throws ServiceException
Performs a search for products in the given category, taking into consideration the ProductSearchCriteria This method will NOT return products that are in a sub-level of a given category. For example, if you had a "Routers" category and a "Enterprise Routers" sub-category, asking for products in "Routers", would NOT return products that are in the "Enterprise Routers" category.

Parameters:
category -
searchCriteria -
Returns:
Throws:
ServiceException
See Also:
findProductsByCategory(Category, ProductSearchCriteria)

findProductsByQuery

ProductSearchResult findProductsByQuery(String query,
                                        ProductSearchCriteria searchCriteria)
                                        throws ServiceException
Performs a search for products across all categories for the given query, taking into consideration the ProductSearchCriteria

Parameters:
query -
searchCriteria -
Returns:
the result of the search
Throws:
ServiceException

findProductsByCategoryAndQuery

ProductSearchResult findProductsByCategoryAndQuery(Category category,
                                                   String query,
                                                   ProductSearchCriteria searchCriteria)
                                                   throws ServiceException
Performs a search for products in the given category for the given query, taking into consideration the ProductSearchCriteria

Parameters:
category -
query -
searchCriteria -
Throws:
ServiceException

getSearchFacets

List<SearchFacetDTO> getSearchFacets()
Gets all available facets for search results page

Returns:
the available facets

getCategoryFacets

List<SearchFacetDTO> getCategoryFacets(Category category)
Gets all available facets for a given category

Parameters:
category -
Returns:
the available facets


Copyright © 2013. All Rights Reserved.