cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Hybris boolean custom facet

0 Kudos

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?

Accepted Solutions (0)

Answers (1)

Answers (1)

romitchhabra
Participant
0 Kudos

Please check that you have some products on PLP or SRP which has both the values for your boolean variable i.e. some products having true and some having false.

What I remember is that facets are shown only when they help in further filtering, if all products on the page have the same value of the boolean variable "recipe" then further filtering is not possible and thus that facet may not come.