cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP Commerce & SOLR how to hide facets that doesn't narrow result list

former_member669865
Discoverer
0 Likes
1,469

Hi there,

I need to hide filter (or even entire facet) if it won't affect the results.

Scenario:
In category "car roof racks", you have 10 products.
In solr, each document (product) has field "designed-for" e.g. Volkswagen Passat, BMW X5, Skoda Citigo etc...
Within category "car roof racks", facet "Designed for" will be presented to customer.
The point here is that most of roof racks are universal and will fit on every car, so customer will end up with following options:

Volkswagen Passat (10)

BMW X5 (10)

Skoda Citigo (8)

What I need to do is to hide (turn off?) filters for Volkswagen and BMW as applying those filters wont change result list at all (still 10 products). From business perspective, showing those options to customer is pointless.

I was playing with SearchRespopnseFacetPopulator where it could be partially done, but the problems arise when there is a lot of cars and top values needs to be specified.

Maybe there is a way to configure that in a solr query?

Thank you in advance for your answers.

Accepted Solutions (0)

Answers (1)

Answers (1)

a_e_dubey
Active Participant

Hello @Jakub Bartczak

If understand correctly, you want to hide Volkswagen and BMW facet values from "Designed for". You can use "exclude facet value" feature from adaptive perspective from backoffice using search query profile. Assuming that business know about such cases and they can update/delete such config time to time. Also if you want to make this dynamic , try to debug this feature in AsFacetConfigurationPopulator to mold solution as per your expectation.

I hope this will help you.