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

How to apply solr indexation by user type

0 Likes
622

Hi guys

I want to apply solr indexing only for a specific connected user .. for example b2c users can look at some properties indexed in plp but the anonymous can look at also but with different values

thank you in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

romitchhabra
Participant

You can create two SolrIndexedProperty with a custom value provider where you can populate the value for the registered users in one attribute and for anonymous in the other.

Now in the populator you can check the current user and take the value from the corresponding attribute according to the user.

0 Likes

Hi Romit

Firstly thank you for your answer .. I chose another solution to meet this need .. so I applied my logic at the population level

romit.c So what do you think of my solution?

romitchhabra
Participant
0 Likes

Hi Iliass,

Where are you storing the two values i.e. one for the registered user and one for the anonymous user?

0 Likes

Hi Romit,
I store one for B2B and one for the registered user and one for the anonymous user