on 08-04-2016 7:13 PM
Marketing would like to create banners for discrepant products. The banner link would take you to a "category" page of the products. So, is creating a new category the best way to achieve this?
I ended up using keywords and creating a custom FreeTextQueryBuilder class. I removed all wildcards to achieve an exact match. I am not sure if this is the best solution but it seems to be working with no ill side-effects.
mycompanycore-spring.xml
<bean class="com.hybris.mycompany.solrfacetsearch.search.impl.MyCompanyKeywordsQueryBuilder">
<property name="propertyName" value="keywords" />
<property name="boost" value="20" />
</bean>
MyCompanyKeywordsQueryBuilder
protected void addFreeTextQuery(final SearchQuery searchQuery, final IndexedProperty indexedProperty, final String value,
final double boost)
{
final String field = indexedProperty.getName();
if (!indexedProperty.isFacet())
{
if ("text".equalsIgnoreCase(indexedProperty.getType()))
{
addFreeTextQuery(searchQuery, field, value.toLowerCase(), "", boost);
}
else
{
addFreeTextQuery(searchQuery, field, value.toLowerCase(), "", boost);
}
}
else
{
LOG.warn("Not searching " + indexedProperty
+ ". Free text search not available in facet property. Configure an additional text property for searching.");
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Consider using a SOLR search with specific product IDs or other attributes which can define the group - e.g. a "brand" attribute or similar. Something simple which the marketing people can put into a URL and you can extract and use in a SOLR query (for speed and options) or just a simple flexible search query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any easy way to group products together?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.