search api block search view gives me duplicate variations of the product

Created on 2 September 2023, 10 months ago
Updated 24 September 2023, 9 months ago

I use search api for searching for the products in commerce plugin
but it displays all variations of each products so I have for example 4 variations of the same ring so 4 pictures and 4 skus...
AND I NEED ONLY FIRST one
I tried to play with the view
there is no query distinct option
I also tried views aggregation plus module that works on regular views...but on this view it does not work
here is the view attached, if you can suggest any solutions...otherwise the plugin is useless
thank you

đź’¬ Support request
Status

Fixed

Version

1.0

Component

User interface

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @tokosefi
  • Status changed to Fixed 9 months ago
  • 🇦🇹Austria drunken monkey Vienna, Austria

    The Search API doesn’t have a concept of products, variations or even entities – it just knows the item it has indexed, and each one is a separate object that is returned independent of any others. I.e., if you want to return each product only once, you need to index products, not variations. I don’t know enough about Commerce internals to help with that, but it’s apparent that variations of your product are indexed as separate items in the Search API, so you have to prevent that from happening. Most likely, this can be done by selecting a different “datasource” in the search index settings, but, again, I don’t know enough about Commerce (or your setup) to be sure.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024