cancel
Showing results for 
Search instead for 
Did you mean: 

Grouping Products Temporarily

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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.");
     }
 }


Answers (2)

Answers (2)

Former Member
0 Kudos

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.

Former Member
0 Kudos

Could you give me an example of a solr query with product IDs?

Former Member
0 Kudos

Any easy way to group products together?