cancel
Showing results for 
Search instead for 
Did you mean: 

Restrict solr results based on the customer logged in

pavan-yvs-1
Explorer
0 Kudos
416

Hi,

In our application, brands are indexed as a property in Solr and are also used as facets. We retrieve products for all brands based on the search query.

However, when a search is performed on the Product Listing Page (PLP), we want to restrict the brands (and their related products) visible to customers—only some brands should be visible to specific customers.

I explored the restrictions provided by Hybris, but even with customization, it doesn’t seem to fully address our needs.

Could you please provide some pointers on how this can be achieved at a high level?

View Entire Topic
georg_wittmann
Explorer

Hi,

you can create and populate a facet in solr (not shown on the storefront) with the customer groups that are allowed to see the product. In your solr search request you can add the releavant group of the current user as a filter. Please also keep in mind that you might have to change caching of search results and product list pages.