@Service(value="blSearchService") public class DatabaseSearchServiceImpl extends Object implements SearchService
| Modifier and Type | Field and Description |
|---|---|
protected net.sf.ehcache.Cache |
cache |
protected static String |
CACHE_KEY_PREFIX |
protected static String |
CACHE_NAME |
protected CatalogService |
catalogService |
protected FieldDao |
fieldDao |
protected SearchFacetDao |
searchFacetDao |
| Constructor and Description |
|---|
DatabaseSearchServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected List<SearchFacetDTO> |
buildSearchFacetDtos(List<SearchFacet> categoryFacets)
Create the wrapper DTO around the SearchFacet
|
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
|
protected String |
getDatabaseQualifiedFieldName(String qualifiedFieldName)
From the Field's qualifiedName, build out the qualified name to be used by the ProductDao
to find the requested products.
|
protected List<SearchFacetResultDTO> |
getFacetValues(SearchFacet facet) |
protected List<SearchFacetResultDTO> |
getMatchFacetValues(SearchFacet facet) |
protected List<SearchFacetResultDTO> |
getRangeFacetValues(SearchFacet facet) |
List<SearchFacetDTO> |
getSearchFacets()
Gets all available facets for search results page
|
void |
rebuildIndex()
This method delegates to
SolrIndexService.rebuildIndex(). |
protected void |
setActiveFacets(List<SearchFacetDTO> facets,
ProductSearchCriteria searchCriteria) |
protected void |
setQualifiedKeys(ProductSearchCriteria criteria)
Perform any necessary conversion of the key to be used by the search service
|
protected CatalogService catalogService
protected SearchFacetDao searchFacetDao
protected FieldDao fieldDao
protected static String CACHE_NAME
protected static String CACHE_KEY_PREFIX
protected net.sf.ehcache.Cache cache
public ProductSearchResult findExplicitProductsByCategory(Category category, ProductSearchCriteria searchCriteria) throws ServiceException
SearchServicefindExplicitProductsByCategory in interface SearchServiceServiceExceptionSearchService.findProductsByCategory(Category, ProductSearchCriteria)public ProductSearchResult findProductsByCategoryAndQuery(Category category, String query, ProductSearchCriteria searchCriteria) throws ServiceException
SearchServicefindProductsByCategoryAndQuery in interface SearchServiceServiceExceptionpublic ProductSearchResult findProductsByCategory(Category category, ProductSearchCriteria searchCriteria)
SearchServicefindProductsByCategory in interface SearchServiceSearchService.findExplicitProductsByCategory(Category, ProductSearchCriteria)public ProductSearchResult findProductsByQuery(String query, ProductSearchCriteria searchCriteria)
SearchServicefindProductsByQuery in interface SearchServicepublic List<SearchFacetDTO> getSearchFacets()
SearchServicegetSearchFacets in interface SearchServicepublic List<SearchFacetDTO> getCategoryFacets(Category category)
SearchServicegetCategoryFacets in interface SearchServiceprotected void setQualifiedKeys(ProductSearchCriteria criteria)
criteria - protected String getDatabaseQualifiedFieldName(String qualifiedFieldName)
qualifiedFieldName - protected void setActiveFacets(List<SearchFacetDTO> facets, ProductSearchCriteria searchCriteria)
protected List<SearchFacetDTO> buildSearchFacetDtos(List<SearchFacet> categoryFacets)
categoryFacets - protected List<SearchFacetResultDTO> getFacetValues(SearchFacet facet)
protected List<SearchFacetResultDTO> getRangeFacetValues(SearchFacet facet)
protected List<SearchFacetResultDTO> getMatchFacetValues(SearchFacet facet)
public void rebuildIndex()
SearchServiceSolrIndexService.rebuildIndex(). It is here to preserve backwards-compatibility
with sites that were originally configured to run Broadleaf with Solr before 2.2.0.rebuildIndex in interface SearchServiceCopyright © 2014. All Rights Reserved.