public class DefaultBoostService extends Object implements BoostService
BoostService.| Constructor and Description |
|---|
DefaultBoostService() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<String> |
convertIntoCategoryCodes(List<CategoryModel> categories) |
protected SolrBoostRuleModel |
createBoostRule(AbstractSolrSearchProfileModel searchProfile,
SolrFacetSearchConfigModel facetSearchConfig,
BoostRuleData boostRuleData) |
SolrBoostRuleModel |
createBoostRule(IndexedType indexedType,
SolrFacetSearchConfigModel facetSearchConfig,
String categoryCode,
BoostRuleData boostRuleData)
Creates and returns a new boost rule based on a given indexed type and facet search config.
|
protected SolrIndexedPropertyModel |
extractSolrIndexedProperty(SolrFacetSearchConfigModel facetSearchConfig,
String propertyName) |
protected SolrIndexedPropertyModel |
findIndexedProperty(String propertyName,
List<SolrIndexedPropertyModel> indexedProperties) |
AbstractSolrSearchProfileModel |
getBoostProfileForCategoryAndIndexedType(IndexedType indexedType,
CategoryModel categoryModel,
FacetSearchConfig facetSearchConfig)
Searches and returns a Solr Search Profile Model which exactly matches or is the nearest to a given category,
indexedType and facetSearchConfig.
|
Collection<SolrBoostRuleModel> |
getBoostRulesForCategoryAndIndexedType(IndexedType indexedType,
CategoryModel categoryModel,
FacetSearchConfig facetSearchConfig)
Returns all boost rules for a given category, indexedType and facetSearchConfig.
|
Collection<SolrBoostRuleModel> |
getBoostRulesForGlobalSearchProfile(IndexedType indexedType,
FacetSearchConfig facetSearchConfig)
Returns all boost rules for a given indexedType and facetSearchConfig that are defined in a GlobalSolrSearchProfile
|
protected FacetSearchConfig |
getConfiguration(SolrFacetSearchConfigModel facetSearchConfig) |
protected SolrIndexedTypeModel |
getIndexedTypeModel(IndexedType indexedType,
FacetSearchConfig facetSearchConfig) |
AbstractSolrSearchProfileModel |
getProfileForCategoryAndIndexedType(IndexedType indexedType,
CategoryModel categoryModel,
FacetSearchConfig facetSearchConfig)
Searches and returns a Solr Search Profile Model which exactly matches the given category, indexedType and
facetSearchConfig.
|
protected AbstractSolrSearchProfileModel |
getSearchProfile(IndexedType indexedType,
SolrFacetSearchConfigModel facetSearchConfig,
String categoryCode) |
void |
removeSolrBoostRule(String pk)
Shortcut method to remove the
SolrBoostRuleModel with the given pk. |
void |
setCategorySearchProfileMatchStrategy(CategorySolrSearchProfileMatchStrategy categorySearchProfileMatchStrategy) |
void |
setCategorySearchProfileService(CategorySearchProfileService categorySearchProfileService) |
void |
setCommerceCategoryService(CommerceCategoryService commerceCategoryService) |
void |
setFacetSearchConfigDao(FacetSearchConfigDao facetSearchConfigDao) |
void |
setFacetSearchConfigService(FacetSearchConfigService facetSearchConfigService) |
void |
setGlobalSearchProfileService(GlobalSearchProfileService globalSearchProfileService) |
void |
setModelService(ModelService modelService) |
void |
setSearchProfileDao(SearchProfileDao searchProfileDao) |
public Collection<SolrBoostRuleModel> getBoostRulesForCategoryAndIndexedType(IndexedType indexedType, CategoryModel categoryModel, FacetSearchConfig facetSearchConfig)
BoostServicegetBoostRulesForCategoryAndIndexedType in interface BoostServiceindexedType - The given IndexedTypecategoryModel - The given categoryfacetSearchConfig - The given facetSearchConfigpublic Collection<SolrBoostRuleModel> getBoostRulesForGlobalSearchProfile(IndexedType indexedType, FacetSearchConfig facetSearchConfig)
BoostServicegetBoostRulesForGlobalSearchProfile in interface BoostServiceindexedType - The given IndexedTypefacetSearchConfig - The given facetSearchConfigpublic AbstractSolrSearchProfileModel getBoostProfileForCategoryAndIndexedType(IndexedType indexedType, CategoryModel categoryModel, FacetSearchConfig facetSearchConfig)
BoostServicegetBoostProfileForCategoryAndIndexedType in interface BoostServiceindexedType - The given indexed typecategoryModel - The given categoryfacetSearchConfig - The given facet search configAbstractSolrSearchProfileModel instance which is found.public AbstractSolrSearchProfileModel getProfileForCategoryAndIndexedType(IndexedType indexedType, CategoryModel categoryModel, FacetSearchConfig facetSearchConfig)
BoostServicegetProfileForCategoryAndIndexedType in interface BoostServiceindexedType - The given indexed typecategoryModel - The given categoryfacetSearchConfig - The given facet search configAbstractSolrSearchProfileModel instance which is found or null if no profile is found.public void removeSolrBoostRule(String pk)
BoostServiceSolrBoostRuleModel with the given pk.removeSolrBoostRule in interface BoostServicepk - the pk of the SolrBoostRuleModel which will be removed.public SolrBoostRuleModel createBoostRule(IndexedType indexedType, SolrFacetSearchConfigModel facetSearchConfig, String categoryCode, BoostRuleData boostRuleData)
BoostServicecreateBoostRule in interface BoostServiceindexedType - The given facet indexed typefacetSearchConfig - The given facet search configcategoryCode - The given category code, if category code is null then the boost rule will be assigned to the global search profile.boostRuleData - The boostRuleData contains parameter which are needed for boost rule creation (like operatorType, boostFactor, propertyName, propertyValue)SolrBoostRuleModel.protected AbstractSolrSearchProfileModel getSearchProfile(IndexedType indexedType, SolrFacetSearchConfigModel facetSearchConfig, String categoryCode)
protected SolrBoostRuleModel createBoostRule(AbstractSolrSearchProfileModel searchProfile, SolrFacetSearchConfigModel facetSearchConfig, BoostRuleData boostRuleData)
protected FacetSearchConfig getConfiguration(SolrFacetSearchConfigModel facetSearchConfig)
protected SolrIndexedPropertyModel extractSolrIndexedProperty(SolrFacetSearchConfigModel facetSearchConfig, String propertyName)
protected SolrIndexedPropertyModel findIndexedProperty(String propertyName, List<SolrIndexedPropertyModel> indexedProperties)
protected Collection<String> convertIntoCategoryCodes(List<CategoryModel> categories)
protected SolrIndexedTypeModel getIndexedTypeModel(IndexedType indexedType, FacetSearchConfig facetSearchConfig)
public void setCommerceCategoryService(CommerceCategoryService commerceCategoryService)
public void setSearchProfileDao(SearchProfileDao searchProfileDao)
public void setCategorySearchProfileMatchStrategy(CategorySolrSearchProfileMatchStrategy categorySearchProfileMatchStrategy)
public void setFacetSearchConfigDao(FacetSearchConfigDao facetSearchConfigDao)
public void setModelService(ModelService modelService)
public void setCategorySearchProfileService(CategorySearchProfileService categorySearchProfileService)
public void setGlobalSearchProfileService(GlobalSearchProfileService globalSearchProfileService)
public void setFacetSearchConfigService(FacetSearchConfigService facetSearchConfigService)
Copyright © 2017 SAP SE. All Rights Reserved.