com.elasticpath.service.index.impl
Class IndexSearchServiceImpl

java.lang.Object
  extended by com.elasticpath.service.impl.AbstractEpServiceImpl
      extended by com.elasticpath.service.index.impl.IndexSearchServiceImpl
All Implemented Interfaces:
EpService, IndexSearchService

public class IndexSearchServiceImpl
extends AbstractEpServiceImpl
implements IndexSearchService

This is a mediator(see GoF mediator pattern), which distribute search request to appropriate concrete search service.


Constructor Summary
IndexSearchServiceImpl()
           
 
Method Summary
 Analyzer getAnalyzer()
          Returns the analyzer.
 QueryComposer getCategoryQueryComposer()
          Returns the category query composer.
 QueryComposer getCustomerQueryComposer()
          Returns the customer query composer.
 IndexSearcher getIndexSearcher()
          Returns the index searcher.
 QueryComposer getOrderQueryComposer()
          Returns the order query composer.
 QueryComposer getProductQueryComposer()
          Returns the product query composer.
 SpellIndexSearcher getSpellIndexSearcher()
          Gets the spell index searcher.
 java.util.List search(SearchCriteria searchCriteria)
          Searches the index with the given search criteria.
 void setAnalyzer(Analyzer analyzer)
          Sets the analyzer.
 void setCategoryQueryComposer(QueryComposer categoryQueryComposer)
          Sets the category query composer.
 void setCustomerQueryComposer(QueryComposer customerQueryComposer)
          Sets the customer query composer.
 void setIndexSearcher(IndexSearcher indexSearcher)
          Sets the index searcher.
 void setOrderQueryComposer(QueryComposer orderQueryComposer)
          Sets the order query composer.
 void setProductQueryComposer(QueryComposer productQueryComposer)
          Sets the product query composer.
 void setSpellIndexSearcher(SpellIndexSearcher spellIndexSearcher)
          Sets the spell index searcher.
 java.lang.String[] suggest(ProductSearchCriteria searchCriteria)
          Suggests alternate query strings based on the given search criteria.
 
Methods inherited from class com.elasticpath.service.impl.AbstractEpServiceImpl
getElasticPath, setElasticPath
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.elasticpath.service.EpService
getElasticPath, setElasticPath
 

Constructor Detail

IndexSearchServiceImpl

public IndexSearchServiceImpl()
Method Detail

getAnalyzer

public Analyzer getAnalyzer()
Returns the analyzer.

Returns:
the analyzer

getCategoryQueryComposer

public final QueryComposer getCategoryQueryComposer()
Returns the category query composer.

Returns:
the category query composer

getCustomerQueryComposer

public final QueryComposer getCustomerQueryComposer()
Returns the customer query composer.

Returns:
the customer query composer

getIndexSearcher

public IndexSearcher getIndexSearcher()
Returns the index searcher.

Returns:
the index searcher

getOrderQueryComposer

public final QueryComposer getOrderQueryComposer()
Returns the order query composer.

Returns:
the order query composer

getProductQueryComposer

public final QueryComposer getProductQueryComposer()
Returns the product query composer.

Returns:
the product query composer

getSpellIndexSearcher

public SpellIndexSearcher getSpellIndexSearcher()
Gets the spell index searcher.

Returns:
the spell index searcher

search

public java.util.List search(SearchCriteria searchCriteria)
Searches the index with the given search criteria.

Specified by:
search in interface IndexSearchService
Parameters:
searchCriteria - the search criteria
Returns:
a list of object uids which match the given search criteria

setAnalyzer

public void setAnalyzer(Analyzer analyzer)
Sets the analyzer.

Parameters:
analyzer - the analyzer

setCategoryQueryComposer

public final void setCategoryQueryComposer(QueryComposer categoryQueryComposer)
Sets the category query composer.

Parameters:
categoryQueryComposer - the category query composer

setCustomerQueryComposer

public final void setCustomerQueryComposer(QueryComposer customerQueryComposer)
Sets the customer query composer.

Parameters:
customerQueryComposer - the customer query composer

setIndexSearcher

public void setIndexSearcher(IndexSearcher indexSearcher)
Sets the index searcher.

Parameters:
indexSearcher - the index searcher

setOrderQueryComposer

public final void setOrderQueryComposer(QueryComposer orderQueryComposer)
Sets the order query composer.

Parameters:
orderQueryComposer - the order query composer

setProductQueryComposer

public final void setProductQueryComposer(QueryComposer productQueryComposer)
Sets the product query composer.

Parameters:
productQueryComposer - the product query composer

setSpellIndexSearcher

public void setSpellIndexSearcher(SpellIndexSearcher spellIndexSearcher)
Sets the spell index searcher.

Parameters:
spellIndexSearcher - the spell index searcher

suggest

public java.lang.String[] suggest(ProductSearchCriteria searchCriteria)
Suggests alternate query strings based on the given search criteria.

Specified by:
suggest in interface IndexSearchService
Parameters:
searchCriteria - the search criteria to base the suggestions on
Returns:
alternate query strings