cancel
Showing results for 
Search instead for 
Did you mean: 

How to Hide the products using solr search?

Former Member
0 Kudos

Suppose I've 5 products , in that i want to hide last 4 products how to do in solr search? please Replay me .

Thanks Advance selva.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Salvaraj,

you could create a new boolean attribute on the Product type. Name it for example 'visible'. Then you need to modify the indexer queries for Update-Index and Full-Index. Here is the original Full-Index query from the apparel b2c accelerator:

 SELECT {p:PK} FROM {Product AS p} WHERE {p:varianttype} IS NULL

Rewrite the query like this:

 SELECT {p:PK} FROM {Product AS p} WHERE {p:varianttype} IS NULL AND {p:visible} = 1


Kind Regards,

Thomas

Former Member
0 Kudos

Thanks for your valuable answer.