com.elasticpath.service.catalogview
Interface SearchService

All Superinterfaces:
EpService
All Known Implementing Classes:
SearchServiceImpl

public interface SearchService
extends EpService

Provide searching service.


Method Summary
 SfSearchLogService getSfSearchLogService()
          Gets the SfSearchLogService.
 SearchResult search(SearchRequest searchRequest, CatalogViewResultHistory previousSearchResultHistory, ShoppingCart shoppingCart, ProductLoadTuner productLoadTuner)
          Perform searching based on the given search request and returns the search result.
 void setSfSearchLogService(SfSearchLogService sfSearchLogService)
          Sets the SfSearchLogService.
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Method Detail

getSfSearchLogService

SfSearchLogService getSfSearchLogService()
Gets the SfSearchLogService.

Returns:
the SfSearchLogService

search

SearchResult search(SearchRequest searchRequest,
                    CatalogViewResultHistory previousSearchResultHistory,
                    ShoppingCart shoppingCart,
                    ProductLoadTuner productLoadTuner)
Perform searching based on the given search request and returns the search result.

By giving the previous search result history, you may get response quicker. If you don't have it, give a null. It doesn't affect search result.

By giving a shopping cart, promotion rules will be applied to the returned products.

By giving the product load tuner, you can fine control what data to be loaded for each product. It is used to improve performance.

Parameters:
searchRequest - the search request
previousSearchResultHistory - the previous search results, give null if you don't have it
shoppingCart - the shopping cart, give null if you don't have it
productLoadTuner - the product load tuner, give null to populate all data
Returns:
a SearchResult instance

setSfSearchLogService

void setSfSearchLogService(SfSearchLogService sfSearchLogService)
Sets the SfSearchLogService.

Parameters:
sfSearchLogService - the SfSearchLogService