Skip to Content
Oct 07, 2020 at 08:26 AM

SAP Hybris boolean custom facet

244 Views Last edit Oct 07, 2020 at 08:28 AM 2 rev

Add boolean attribute to ProductModel and display it as facet on PLP.

Added new attribute named recipe to ProductModel.

Written populator for it.

In solr.impex file added below impex
   INSERT_UPDATE SolrIndexedProperty;solrIndexedType(identifier)[unique=true];name[unique=true];type(code);sortableType(code);currency[default=false];localized[default=false];multiValue[default=false];facet[default=true];facetType(code);useForSpellchecking[default=false];useForAutocomplete[default=false];fieldValueProvider;valueProviderParameter
                             ;$solrIndexedType; recipe  ;boolean;     ;     ;true ;     ;     ;MultiSelectOr ;true;true;springELValueProvider;

recipe attribute is coming in solr query as facet. In backoffice facet is coming as true.

But in frontend I am not able to see facet. Any help?