10-07-2020 9:26 AM - edited 02-03-2024 6:51 PM
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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
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.