Class ProductKeywordsValueResolver
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver<ProductModel,java.lang.Object,java.lang.Object>
-
- de.hybris.platform.commerceservices.search.solrfacetsearch.provider.impl.ProductKeywordsValueResolver
-
- All Implemented Interfaces:
QualifierProviderAware,ValueResolver<ProductModel>
public class ProductKeywordsValueResolver extends AbstractValueResolver<ProductModel,java.lang.Object,java.lang.Object>
Resolver for product keywords.Supported parameters:
Parameter Default value Description optional true If false, indicates that every product must have keywords (for every qualifier). An exception of type FieldValueProviderExceptionis thrown if the keywords cannot be resolved.split true If false, the collected keywords should be added as a single value to the index. separator " " The separator to use when combining the keywords into a single value. Only used if split is false.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
AbstractValueResolver.ValueResolverContext<T,U>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringOPTIONAL_PARAMstatic booleanOPTIONAL_PARAM_DEFAULT_VALUEstatic java.lang.StringSEPARATOR_PARAMstatic java.lang.StringSEPARATOR_PARAM_DEFAULT_VALUEstatic java.lang.StringSPLIT_PARAMstatic booleanSPLIT_PARAM_DEFAULT_VALUE
-
Constructor Summary
Constructors Constructor Description ProductKeywordsValueResolver()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel product, AbstractValueResolver.ValueResolverContext<java.lang.Object,java.lang.Object> resolverContext)protected voidcollectKeywords(java.util.Set<java.lang.String> keywords, ProductModel product)protected java.lang.StringcombineKeywords(java.util.Set<java.lang.String> keywords, java.lang.String separator)-
Methods inherited from class de.hybris.platform.solrfacetsearch.provider.impl.AbstractValueResolver
addFieldValue, createLocalSessionContext, doResolve, filterAndAddFieldValues, filterFieldValue, getQualifierProvider, getSessionService, getValueFilters, loadData, loadQualifierData, removeLocalSessionContext, resolve, setQualifierProvider, setSessionService, setValueFilters
-
-
-
-
Field Detail
-
OPTIONAL_PARAM
public static final java.lang.String OPTIONAL_PARAM
- See Also:
- Constant Field Values
-
OPTIONAL_PARAM_DEFAULT_VALUE
public static final boolean OPTIONAL_PARAM_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
SPLIT_PARAM
public static final java.lang.String SPLIT_PARAM
- See Also:
- Constant Field Values
-
SPLIT_PARAM_DEFAULT_VALUE
public static final boolean SPLIT_PARAM_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
SEPARATOR_PARAM
public static final java.lang.String SEPARATOR_PARAM
- See Also:
- Constant Field Values
-
SEPARATOR_PARAM_DEFAULT_VALUE
public static final java.lang.String SEPARATOR_PARAM_DEFAULT_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
addFieldValues
protected void addFieldValues(InputDocument document, IndexerBatchContext batchContext, IndexedProperty indexedProperty, ProductModel product, AbstractValueResolver.ValueResolverContext<java.lang.Object,java.lang.Object> resolverContext) throws FieldValueProviderException
- Specified by:
addFieldValuesin classAbstractValueResolver<ProductModel,java.lang.Object,java.lang.Object>- Throws:
FieldValueProviderException
-
collectKeywords
protected void collectKeywords(java.util.Set<java.lang.String> keywords, ProductModel product)
-
combineKeywords
protected java.lang.String combineKeywords(java.util.Set<java.lang.String> keywords, java.lang.String separator)
-
-