Class DefaultAsSearchProviderFactory.CombinedSearchProvider
- java.lang.Object
-
- de.hybris.platform.adaptivesearch.strategies.impl.DefaultAsSearchProviderFactory.CombinedSearchProvider
-
- All Implemented Interfaces:
AsSearchProvider
- Enclosing class:
- DefaultAsSearchProviderFactory
protected static class DefaultAsSearchProviderFactory.CombinedSearchProvider extends java.lang.Object implements AsSearchProvider
-
-
Constructor Summary
Constructors Constructor Description CombinedSearchProvider(java.util.Collection<AsSearchProvider> searchProviders)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getAvailableQualifiers(java.lang.String indexType, java.lang.String indexPropertyCode)Return list of qualifiers for index property.java.util.Optional<AsIndexConfigurationData>getIndexConfigurationForCode(java.lang.String code)Returns the index configuration for the provided code.java.util.List<AsIndexConfigurationData>getIndexConfigurations()Returns a list of index configurations.java.util.List<AsIndexPropertyData>getIndexProperties(java.lang.String indexType)Returns a list of index properties for a given index type.java.util.Optional<AsIndexPropertyData>getIndexPropertyForCode(java.lang.String indexType, java.lang.String code)Returns the index property for the provided code.java.util.Optional<AsIndexTypeData>getIndexTypeForCode(java.lang.String code)Returns the index type for the provided code.java.util.List<AsIndexTypeData>getIndexTypes()Returns a list of index types.java.util.List<AsIndexTypeData>getIndexTypes(java.lang.String indexConfiguration)Returns a list of index types for a given index configuration.protected java.util.Collection<AsSearchProvider>getSearchProviders()java.util.List<AsBoostType>getSupportedBoostTypes(java.lang.String indexType)Returns a list of boost types for a given index type.java.util.List<CatalogVersionModel>getSupportedCatalogVersions(java.lang.String indexConfiguration, java.lang.String indexType)Returns a list of catalog versions for a given index configuration and type.java.util.List<CurrencyModel>getSupportedCurrencies(java.lang.String indexConfiguration, java.lang.String indexType)Returns a list of currencies for a given index configuration and type.java.util.List<AsExpressionData>getSupportedFacetExpressions(java.lang.String indexType)Returns a list of expressions for a given index type that can be used for facets.java.util.List<AsIndexPropertyData>getSupportedFacetIndexProperties(java.lang.String indexType)Returns a list of index properties for a given index type that can be used for facets.java.util.List<AsFacetSortData>getSupportedFacetSorts(java.lang.String indexType)Returns a list of facet sorts for a given index type.java.util.List<AsFacetType>getSupportedFacetTypes(java.lang.String indexType)Returns a list of facet types for a given index type.java.util.Set<AsFeatureFlag>getSupportedFeatures(java.lang.String indexType)Returns a list of supported features.java.util.List<AsExpressionData>getSupportedGroupExpressions(java.lang.String indexType)Returns a list of expressions for a given index type that can be used for groups.java.util.List<LanguageModel>getSupportedLanguages(java.lang.String indexConfiguration, java.lang.String indexType)Returns a list of languages for a given index configuration and type.java.util.List<AsExpressionData>getSupportedSortExpressions(java.lang.String indexType)Returns a list of expressions for a given index type that can be used for sorts.booleanisValidBoostType(java.lang.String indexType, AsBoostType boostType)Checks if a given boost type can be used for a given index type.booleanisValidFacetExpression(java.lang.String indexType, java.lang.String expression)Checks if a given index property can be used for facets.booleanisValidFacetIndexProperty(java.lang.String indexType, java.lang.String code)Checks is a given index property can be used for facets.booleanisValidFacetSort(java.lang.String indexType, java.lang.String sort)Checks if a given sort can be used for facets.booleanisValidFacetType(java.lang.String indexType, AsFacetType facetType)Checks if a given facet type can be used for a given index type.booleanisValidGroupExpression(java.lang.String indexType, java.lang.String expression)Checks if a given expression can be used for groups.booleanisValidSortExpression(java.lang.String indexType, java.lang.String expression)Checks if a given expression can be used for sorts.protected AsSearchProviderresolveSearchProviderForIndexConfiguration(java.lang.String indexConfiguration)protected AsSearchProviderresolveSearchProviderForIndexType(java.lang.String indexType)AsSearchResultDatasearch(AsSearchProfileContext context, AsSearchQueryData searchQuery)Performs a search query.
-
-
-
Constructor Detail
-
CombinedSearchProvider
public CombinedSearchProvider(java.util.Collection<AsSearchProvider> searchProviders)
-
-
Method Detail
-
getSearchProviders
protected java.util.Collection<AsSearchProvider> getSearchProviders()
-
resolveSearchProviderForIndexConfiguration
protected AsSearchProvider resolveSearchProviderForIndexConfiguration(java.lang.String indexConfiguration)
-
resolveSearchProviderForIndexType
protected AsSearchProvider resolveSearchProviderForIndexType(java.lang.String indexType)
-
getSupportedFeatures
public java.util.Set<AsFeatureFlag> getSupportedFeatures(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of supported features.- Specified by:
getSupportedFeaturesin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the supported features
-
getIndexConfigurations
public java.util.List<AsIndexConfigurationData> getIndexConfigurations()
Description copied from interface:AsSearchProviderReturns a list of index configurations.- Specified by:
getIndexConfigurationsin interfaceAsSearchProvider- Returns:
- the index configurations
-
getIndexConfigurationForCode
public java.util.Optional<AsIndexConfigurationData> getIndexConfigurationForCode(java.lang.String code)
Description copied from interface:AsSearchProviderReturns the index configuration for the provided code.- Specified by:
getIndexConfigurationForCodein interfaceAsSearchProvider- Parameters:
code- - the index configuration code- Returns:
- the index type
-
getIndexTypes
public java.util.List<AsIndexTypeData> getIndexTypes()
Description copied from interface:AsSearchProviderReturns a list of index types.- Specified by:
getIndexTypesin interfaceAsSearchProvider- Returns:
- the index types
-
getIndexTypes
public java.util.List<AsIndexTypeData> getIndexTypes(java.lang.String indexConfiguration)
Description copied from interface:AsSearchProviderReturns a list of index types for a given index configuration.- Specified by:
getIndexTypesin interfaceAsSearchProvider- Parameters:
indexConfiguration- - the index configuration code- Returns:
- the index types
-
getIndexTypeForCode
public java.util.Optional<AsIndexTypeData> getIndexTypeForCode(java.lang.String code)
Description copied from interface:AsSearchProviderReturns the index type for the provided code.- Specified by:
getIndexTypeForCodein interfaceAsSearchProvider- Parameters:
code- - the index type code- Returns:
- the index type
-
getIndexProperties
public java.util.List<AsIndexPropertyData> getIndexProperties(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of index properties for a given index type.- Specified by:
getIndexPropertiesin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the index properties
-
getIndexPropertyForCode
public java.util.Optional<AsIndexPropertyData> getIndexPropertyForCode(java.lang.String indexType, java.lang.String code)
Description copied from interface:AsSearchProviderReturns the index property for the provided code.- Specified by:
getIndexPropertyForCodein interfaceAsSearchProvidercode- - the index property code- Returns:
- the index property
-
getSupportedCatalogVersions
public java.util.List<CatalogVersionModel> getSupportedCatalogVersions(java.lang.String indexConfiguration, java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of catalog versions for a given index configuration and type.- Specified by:
getSupportedCatalogVersionsin interfaceAsSearchProvider- Parameters:
indexConfiguration- - the index configurationindexType- - the index type- Returns:
- the catalog versions
-
getSupportedLanguages
public java.util.List<LanguageModel> getSupportedLanguages(java.lang.String indexConfiguration, java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of languages for a given index configuration and type.- Specified by:
getSupportedLanguagesin interfaceAsSearchProvider- Parameters:
indexConfiguration- - the index configurationindexType- - the index type- Returns:
- the languages
-
getSupportedCurrencies
public java.util.List<CurrencyModel> getSupportedCurrencies(java.lang.String indexConfiguration, java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of currencies for a given index configuration and type.- Specified by:
getSupportedCurrenciesin interfaceAsSearchProvider- Parameters:
indexConfiguration- - the index configurationindexType- - the index type- Returns:
- the currencies
-
getSupportedFacetIndexProperties
public java.util.List<AsIndexPropertyData> getSupportedFacetIndexProperties(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of index properties for a given index type that can be used for facets.- Specified by:
getSupportedFacetIndexPropertiesin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the index properties
-
isValidFacetIndexProperty
public boolean isValidFacetIndexProperty(java.lang.String indexType, java.lang.String code)Description copied from interface:AsSearchProviderChecks is a given index property can be used for facets.- Specified by:
isValidFacetIndexPropertyin interfaceAsSearchProvider- Parameters:
indexType- - the index type codecode- - the code of the index property- Returns:
trueif the index property can be used for facets,falseotherwise
-
getSupportedFacetExpressions
public java.util.List<AsExpressionData> getSupportedFacetExpressions(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of expressions for a given index type that can be used for facets.- Specified by:
getSupportedFacetExpressionsin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the expressions
-
isValidFacetExpression
public boolean isValidFacetExpression(java.lang.String indexType, java.lang.String expression)Description copied from interface:AsSearchProviderChecks if a given index property can be used for facets.- Specified by:
isValidFacetExpressionin interfaceAsSearchProvider- Parameters:
indexType- - the index type codeexpression- - the facet expression- Returns:
trueif expression can be used for facets,falseotherwise
-
getSupportedFacetTypes
public java.util.List<AsFacetType> getSupportedFacetTypes(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of facet types for a given index type.- Specified by:
getSupportedFacetTypesin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the facet types
-
isValidFacetType
public boolean isValidFacetType(java.lang.String indexType, AsFacetType facetType)Description copied from interface:AsSearchProviderChecks if a given facet type can be used for a given index type.- Specified by:
isValidFacetTypein interfaceAsSearchProvider- Parameters:
indexType- - the index type codefacetType- - the facet type- Returns:
trueif facet type can be used,falseotherwise
-
getSupportedFacetSorts
public java.util.List<AsFacetSortData> getSupportedFacetSorts(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of facet sorts for a given index type.- Specified by:
getSupportedFacetSortsin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the facet sorts
-
isValidFacetSort
public boolean isValidFacetSort(java.lang.String indexType, java.lang.String sort)Description copied from interface:AsSearchProviderChecks if a given sort can be used for facets.- Specified by:
isValidFacetSortin interfaceAsSearchProvider- Parameters:
indexType- - the index type codesort- - the sort- Returns:
trueif sort can be used for facets,falseotherwise
-
getSupportedBoostTypes
public java.util.List<AsBoostType> getSupportedBoostTypes(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of boost types for a given index type.- Specified by:
getSupportedBoostTypesin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the boost types
-
isValidBoostType
public boolean isValidBoostType(java.lang.String indexType, AsBoostType boostType)Description copied from interface:AsSearchProviderChecks if a given boost type can be used for a given index type.- Specified by:
isValidBoostTypein interfaceAsSearchProvider- Parameters:
indexType- - the index type codeboostType- - the boost type- Returns:
trueif boost type can be used,falseotherwise
-
getSupportedSortExpressions
public java.util.List<AsExpressionData> getSupportedSortExpressions(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of expressions for a given index type that can be used for sorts.- Specified by:
getSupportedSortExpressionsin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the expressions
-
isValidSortExpression
public boolean isValidSortExpression(java.lang.String indexType, java.lang.String expression)Description copied from interface:AsSearchProviderChecks if a given expression can be used for sorts.- Specified by:
isValidSortExpressionin interfaceAsSearchProvider- Parameters:
indexType- - the index type codeexpression- - the sort expression- Returns:
trueif expression can be used for sorts,falseotherwise
-
getSupportedGroupExpressions
public java.util.List<AsExpressionData> getSupportedGroupExpressions(java.lang.String indexType)
Description copied from interface:AsSearchProviderReturns a list of expressions for a given index type that can be used for groups.- Specified by:
getSupportedGroupExpressionsin interfaceAsSearchProvider- Parameters:
indexType- - the index type code- Returns:
- the expressions
-
isValidGroupExpression
public boolean isValidGroupExpression(java.lang.String indexType, java.lang.String expression)Description copied from interface:AsSearchProviderChecks if a given expression can be used for groups.- Specified by:
isValidGroupExpressionin interfaceAsSearchProvider- Parameters:
indexType- - the index type codeexpression- - the sort expression- Returns:
trueif expression can be used for groups,falseotherwise
-
getAvailableQualifiers
public java.util.List<java.lang.String> getAvailableQualifiers(java.lang.String indexType, java.lang.String indexPropertyCode) throws AsExceptionDescription copied from interface:AsSearchProviderReturn list of qualifiers for index property.- Specified by:
getAvailableQualifiersin interfaceAsSearchProvider- Parameters:
indexType- - the index type codeindexPropertyCode- - the index property code- Returns:
- the qualifiers
- Throws:
AsException
-
search
public AsSearchResultData search(AsSearchProfileContext context, AsSearchQueryData searchQuery) throws AsException
Description copied from interface:AsSearchProviderPerforms a search query.- Specified by:
searchin interfaceAsSearchProvider- Parameters:
context- - the search profile contextsearchQuery- - the search query- Throws:
AsException- if and exception occurs during the search
-
-