Class DefaultSolrAutoSuggestService
java.lang.Object
de.hybris.platform.solrfacetsearch.common.AbstractYSolrService
de.hybris.platform.solrfacetsearch.suggester.impl.DefaultSolrAutoSuggestService
- All Implemented Interfaces:
SolrAutoSuggestService
public class DefaultSolrAutoSuggestService
extends AbstractYSolrService
implements SolrAutoSuggestService
Default implementation for
SolrAutoSuggestService-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class de.hybris.platform.solrfacetsearch.common.AbstractYSolrService
facetSearchConfigService, solrFieldNameProvider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancheckIfIndexPropertyQualifies(SolrIndexedPropertyModel indexedProperty) protected SolrSuggestioncreateResultFromSpellCheckResponse(org.apache.solr.client.solrj.response.SpellCheckResponse spellCheckResponse) protected SolrSuggestioncreateResultFromSuggesterResponse(org.apache.solr.client.solrj.response.SuggesterResponse suggesterResponse, String dictionary) getAutoSuggestionsForQuery(LanguageModel language, SolrIndexedTypeModel solrIndexedType, String queryInput) Returns solr's suggestions based on the indexed type, language and user's input.protected voidpopulateSuggestionsFromResponse(Map<String, Collection<String>> resultSuggestionMap, Collection<String> resultCollations, org.apache.solr.client.solrj.response.SpellCheckResponse spellCheckResponse) voidsetSolrIndexedTypeCodeResolver(SolrIndexedTypeCodeResolver solrIndexedTypeCodeResolver) voidsetSolrIndexService(SolrIndexService solrIndexService) voidsetSolrSearchProviderFactory(SolrSearchProviderFactory solrSearchProviderFactory) Methods inherited from class de.hybris.platform.solrfacetsearch.common.AbstractYSolrService
filterQualifyingIndexProperties, resolveIndexedPropertyFieldName, setFacetSearchConfigService, setSolrFieldNameProvider
-
Field Details
-
SUGGESTER_QUERY_TYPE
- See Also:
-
SUGGEST_QUERY
- See Also:
-
SUGGEST_DICTIONARY
- See Also:
-
SPELLCHECK_QUERY
- See Also:
-
SPELLCHECK_DICTIONARY
- See Also:
-
-
Constructor Details
-
DefaultSolrAutoSuggestService
public DefaultSolrAutoSuggestService()
-
-
Method Details
-
getAutoSuggestionsForQuery
public SolrSuggestion getAutoSuggestionsForQuery(LanguageModel language, SolrIndexedTypeModel solrIndexedType, String queryInput) throws SolrAutoSuggestException Description copied from interface:SolrAutoSuggestServiceReturns solr's suggestions based on the indexed type, language and user's input. Suggestions come from dictionary build per indexed type and which is based on the fields which are marked for building the dictionary.- Specified by:
getAutoSuggestionsForQueryin interfaceSolrAutoSuggestService- Parameters:
language- - the languagesolrIndexedType- - the indexed typequeryInput- -the query- Returns:
SolrSuggestion- Throws:
SolrAutoSuggestException- if an error occurs
-
checkIfIndexPropertyQualifies
- Specified by:
checkIfIndexPropertyQualifiesin classAbstractYSolrService
-
createResultFromSuggesterResponse
protected SolrSuggestion createResultFromSuggesterResponse(org.apache.solr.client.solrj.response.SuggesterResponse suggesterResponse, String dictionary) -
createResultFromSpellCheckResponse
protected SolrSuggestion createResultFromSpellCheckResponse(org.apache.solr.client.solrj.response.SpellCheckResponse spellCheckResponse) -
populateSuggestionsFromResponse
protected void populateSuggestionsFromResponse(Map<String, Collection<String>> resultSuggestionMap, Collection<String> resultCollations, org.apache.solr.client.solrj.response.SpellCheckResponse spellCheckResponse) -
getSolrIndexService
-
setSolrIndexService
-
getSolrSearchProviderFactory
-
setSolrSearchProviderFactory
-
getSolrIndexedTypeCodeResolver
-
setSolrIndexedTypeCodeResolver
-