Skip to Content
0
Former Member
Apr 17, 2017 at 03:13 PM

solr query for base products with variant products in plp ?

128 Views

I need a query for base product and variant products. i want to show whatever base products having variant products then those products will be visible in PLP and also whatever base products doesn't having variant products then those base products will be shows in plp ?

I am trying write a query but not able to reach out. so can you please help me on this. I have written like as below but not working so can anyone help me on this select distinct pr.pk from ({{SELECT {ap.PK} AS pk FROM {AparelStyleVariantProduct! as ap} }} UNION {{SELECT distinct {p.pk} as pk FROM {Product! as p} }} ) pr