public class SolrAsSearchProvider extends java.lang.Object implements AsSearchProvider
AsSearchProvider| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ADAPTIVE_SEARCH_CATALOG_VERSIONS |
protected static java.lang.String |
ADAPTIVE_SEARCH_CATEGORY_PATH |
protected static java.lang.String |
ADAPTIVE_SEARCH_KEEP_EXCLUDED_VALUES_KEY |
protected static java.lang.String |
ADAPTIVE_SEARCH_RESULT |
protected static java.lang.String |
CODE_PARAM |
protected static java.lang.String |
DEFAULT_QUERY_TEMPLATE |
protected static java.lang.String |
EXPRESSION_PARAM |
protected static java.lang.String |
INDEX_CONFIGURATION_PARAM |
protected static java.lang.String |
INDEX_TYPE_PARAM |
protected static java.util.regex.Pattern |
VALID_INDEX_PROPERTY_NAME_REGEX_PATTERN |
| Constructor and Description |
|---|
SolrAsSearchProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareIndexProperties(AsIndexPropertyData indexProperty1,
AsIndexPropertyData indexProperty2) |
protected int |
compareSortExpressions(AsExpressionData expression1,
AsExpressionData expression2) |
protected <S,T> java.util.List<T> |
convertAll(java.util.Collection<? extends S> source,
java.util.function.Function<S,T> converter) |
protected AsIndexConfigurationData |
convertIndexConfiguration(SolrFacetSearchConfigModel solrIndexConfiguration) |
protected AsIndexPropertyData |
convertIndexProperty(SolrIndexedPropertyModel source) |
protected AsIndexTypeData |
convertIndexType(SolrIndexedTypeModel source) |
protected SearchQuery |
convertSearchQuery(AsSearchProfileContext context,
AsSearchQueryData searchQuery) |
protected AsSearchResultData |
convertSearchResult(AsSearchProfileContext context,
SearchResult result) |
protected AsExpressionData |
convertSortExpression(SolrIndexedPropertyModel source) |
protected AsDocumentData |
createDocumentData(Document document) |
protected AsFacetData |
createFacetData(Facet facet) |
protected AsFacetValueData |
createFacetValueData(FacetValue facetValue) |
protected AsExpressionData |
createScoreSortExpression() |
protected AsSortData |
createSortData(IndexedTypeSort sort) |
protected AsSearchResultData |
executeInLocalViewWithLocale(java.util.Locale localeForLanguage,
java.util.function.Supplier<AsSearchResultData> action) |
CommonI18NService |
getCommonI18NService() |
FacetSearchConfigService |
getFacetSearchConfigService() |
FacetSearchService |
getFacetSearchService() |
I18NService |
getI18nService() |
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.
|
SessionService |
getSessionService() |
SolrAsTypeMappingRegistry |
getSolrAsTypeMappingRegistry() |
SolrFacetSearchConfigDao |
getSolrFacetSearchConfigDao() |
SolrIndexedPropertyDao |
getSolrIndexedPropertyDao() |
SolrIndexedPropertyTypeRegistry |
getSolrIndexedPropertyTypeRegistry() |
SolrIndexedTypeDao |
getSolrIndexedTypeDao() |
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<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<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.
|
protected boolean |
isValidFacetIndexProperty(SolrIndexedPropertyModel indexProperty) |
boolean |
isValidFacetIndexProperty(java.lang.String indexType,
java.lang.String code)
Checks is a given index property can be used for facets.
|
boolean |
isValidSortExpression(java.lang.String indexType,
java.lang.String expression)
Checks is a given expression can be used for facets.
|
protected boolean |
isValidSortIndexProperty(SolrIndexedPropertyModel indexProperty) |
AsSearchResultData |
performSearch(AsSearchProfileContext context,
AsSearchQueryData searchQuery) |
protected IndexedType |
resolveIndexedType(FacetSearchConfig facetSearchConfig,
java.lang.String identifier) |
protected CategoryModel |
resolveSelectedCategory(java.util.List<CategoryModel> categoryPath) |
AsSearchResultData |
search(AsSearchProfileContext context,
AsSearchQueryData searchQuery)
Performs a search query.
|
void |
setCommonI18NService(CommonI18NService commonI18NService) |
void |
setFacetSearchConfigService(FacetSearchConfigService facetSearchConfigService) |
void |
setFacetSearchService(FacetSearchService facetSearchService) |
void |
setI18nService(I18NService i18nService) |
void |
setSessionService(SessionService sessionService) |
void |
setSolrAsTypeMappingRegistry(SolrAsTypeMappingRegistry solrAsTypeMappingRegistry) |
void |
setSolrFacetSearchConfigDao(SolrFacetSearchConfigDao solrFacetSearchConfigDao) |
void |
setSolrIndexedPropertyDao(SolrIndexedPropertyDao solrIndexedPropertyDao) |
void |
setSolrIndexedPropertyTypeRegistry(SolrIndexedPropertyTypeRegistry solrIndexedPropertyTypeRegistry) |
void |
setSolrIndexedTypeDao(SolrIndexedTypeDao solrIndexedTypeDao) |
protected static final java.lang.String INDEX_CONFIGURATION_PARAM
protected static final java.lang.String INDEX_TYPE_PARAM
protected static final java.lang.String CODE_PARAM
protected static final java.lang.String EXPRESSION_PARAM
protected static final java.lang.String DEFAULT_QUERY_TEMPLATE
protected static final java.lang.String ADAPTIVE_SEARCH_RESULT
protected static final java.lang.String ADAPTIVE_SEARCH_CATALOG_VERSIONS
protected static final java.lang.String ADAPTIVE_SEARCH_CATEGORY_PATH
protected static final java.lang.String ADAPTIVE_SEARCH_KEEP_EXCLUDED_VALUES_KEY
protected static final java.util.regex.Pattern VALID_INDEX_PROPERTY_NAME_REGEX_PATTERN
public java.util.List<AsIndexConfigurationData> getIndexConfigurations()
AsSearchProvidergetIndexConfigurations in interface AsSearchProviderpublic java.util.Optional<AsIndexConfigurationData> getIndexConfigurationForCode(java.lang.String code)
AsSearchProvidergetIndexConfigurationForCode in interface AsSearchProvidercode - - the index configuration codepublic java.util.List<AsIndexTypeData> getIndexTypes()
AsSearchProvidergetIndexTypes in interface AsSearchProviderpublic java.util.List<AsIndexTypeData> getIndexTypes(java.lang.String indexConfiguration)
AsSearchProvidergetIndexTypes in interface AsSearchProviderindexConfiguration - - the index configuration codepublic java.util.Optional<AsIndexTypeData> getIndexTypeForCode(java.lang.String code)
AsSearchProvidergetIndexTypeForCode in interface AsSearchProvidercode - - the index type codepublic java.util.List<AsIndexPropertyData> getIndexProperties(java.lang.String indexType)
AsSearchProvidergetIndexProperties in interface AsSearchProviderindexType - - the index type codepublic java.util.Optional<AsIndexPropertyData> getIndexPropertyForCode(java.lang.String indexType, java.lang.String code)
AsSearchProvidergetIndexPropertyForCode in interface AsSearchProvidercode - - the index property codepublic java.util.List<CatalogVersionModel> getSupportedCatalogVersions(java.lang.String indexConfiguration, java.lang.String indexType)
AsSearchProvidergetSupportedCatalogVersions in interface AsSearchProviderindexConfiguration - - the index configurationindexType - - the index typepublic java.util.List<LanguageModel> getSupportedLanguages(java.lang.String indexConfiguration, java.lang.String indexType)
AsSearchProvidergetSupportedLanguages in interface AsSearchProviderindexConfiguration - - the index configurationindexType - - the index typepublic java.util.List<CurrencyModel> getSupportedCurrencies(java.lang.String indexConfiguration, java.lang.String indexType)
AsSearchProvidergetSupportedCurrencies in interface AsSearchProviderindexConfiguration - - the index configurationindexType - - the index typepublic java.util.List<AsIndexPropertyData> getSupportedFacetIndexProperties(java.lang.String indexType)
AsSearchProvidergetSupportedFacetIndexProperties in interface AsSearchProviderindexType - - the index type codepublic boolean isValidFacetIndexProperty(java.lang.String indexType,
java.lang.String code)
AsSearchProviderisValidFacetIndexProperty in interface AsSearchProviderindexType - - the index type codecode - - the code of the index propertytrue if the index property can be used for facets, false otherwiseprotected boolean isValidFacetIndexProperty(SolrIndexedPropertyModel indexProperty)
public java.util.List<AsExpressionData> getSupportedSortExpressions(java.lang.String indexType)
AsSearchProvidergetSupportedSortExpressions in interface AsSearchProviderindexType - - the index type codepublic boolean isValidSortExpression(java.lang.String indexType,
java.lang.String expression)
AsSearchProviderisValidSortExpression in interface AsSearchProviderindexType - - the index type codeexpression - - the sort expressiontrue if expression can be used for sorts, false otherwiseprotected boolean isValidSortIndexProperty(SolrIndexedPropertyModel indexProperty)
protected AsIndexConfigurationData convertIndexConfiguration(SolrFacetSearchConfigModel solrIndexConfiguration)
protected AsIndexTypeData convertIndexType(SolrIndexedTypeModel source)
protected AsIndexPropertyData convertIndexProperty(SolrIndexedPropertyModel source)
protected int compareIndexProperties(AsIndexPropertyData indexProperty1, AsIndexPropertyData indexProperty2)
protected AsExpressionData createScoreSortExpression()
protected AsExpressionData convertSortExpression(SolrIndexedPropertyModel source)
protected int compareSortExpressions(AsExpressionData expression1, AsExpressionData expression2)
public AsSearchResultData search(AsSearchProfileContext context, AsSearchQueryData searchQuery) throws AsException
AsSearchProvidersearch in interface AsSearchProvidercontext - - the search profile contextsearchQuery - - the search queryAsException - if and exception occurs during the searchprotected AsSearchResultData executeInLocalViewWithLocale(java.util.Locale localeForLanguage, java.util.function.Supplier<AsSearchResultData> action) throws AsException
AsExceptionpublic AsSearchResultData performSearch(AsSearchProfileContext context, AsSearchQueryData searchQuery) throws AsException
AsExceptionprotected IndexedType resolveIndexedType(FacetSearchConfig facetSearchConfig, java.lang.String identifier) throws AsException
AsExceptionprotected CategoryModel resolveSelectedCategory(java.util.List<CategoryModel> categoryPath)
protected SearchQuery convertSearchQuery(AsSearchProfileContext context, AsSearchQueryData searchQuery) throws FacetConfigServiceException, AsException
protected AsSearchResultData convertSearchResult(AsSearchProfileContext context, SearchResult result)
protected AsDocumentData createDocumentData(Document document)
protected AsFacetData createFacetData(Facet facet)
protected AsFacetValueData createFacetValueData(FacetValue facetValue)
protected <S,T> java.util.List<T> convertAll(java.util.Collection<? extends S> source,
java.util.function.Function<S,T> converter)
protected AsSortData createSortData(IndexedTypeSort sort)
public SolrFacetSearchConfigDao getSolrFacetSearchConfigDao()
public void setSolrFacetSearchConfigDao(SolrFacetSearchConfigDao solrFacetSearchConfigDao)
public SolrIndexedTypeDao getSolrIndexedTypeDao()
public void setSolrIndexedTypeDao(SolrIndexedTypeDao solrIndexedTypeDao)
public SolrIndexedPropertyDao getSolrIndexedPropertyDao()
public void setSolrIndexedPropertyDao(SolrIndexedPropertyDao solrIndexedPropertyDao)
public SolrIndexedPropertyTypeRegistry getSolrIndexedPropertyTypeRegistry()
public void setSolrIndexedPropertyTypeRegistry(SolrIndexedPropertyTypeRegistry solrIndexedPropertyTypeRegistry)
public SolrAsTypeMappingRegistry getSolrAsTypeMappingRegistry()
public void setSolrAsTypeMappingRegistry(SolrAsTypeMappingRegistry solrAsTypeMappingRegistry)
public FacetSearchService getFacetSearchService()
public void setFacetSearchService(FacetSearchService facetSearchService)
public FacetSearchConfigService getFacetSearchConfigService()
public void setFacetSearchConfigService(FacetSearchConfigService facetSearchConfigService)
public SessionService getSessionService()
public void setSessionService(SessionService sessionService)
public I18NService getI18nService()
public void setI18nService(I18NService i18nService)
public CommonI18NService getCommonI18NService()
public void setCommonI18NService(CommonI18NService commonI18NService)
Copyright © 2018 SAP SE. All Rights Reserved.