evitaDB icon indicating copy to clipboard operation
evitaDB copied to clipboard

Entity grouping by selected attribute / reference

Open novoj opened this issue 2 years ago • 0 comments

The reality shows that the best approach for work with product variants and "master" products is that the listing / faceting queries list the variants, generate facets for them and then in additional run group them by the reference to their master products that are shown in the listings instead of them. The pagination and sorting is applied after the grouping is realized.

The situations where this brings a value are:

More precise filtering

In traditional approach master product aggregates all parameters of their variants. This seems ok on the first sight but eliminites possibility to filter precisely the products that contain only specific combination of the inner parameters. This is clearly visible on the sites that sell shoes or clothing. There you want regurarly find proper combination of the variant you want - for example "blue variant of size XXL". When using traditional approach you'll find a master product that might have red variant of size XXL but blue variant of size M. That is false positive for your search criteria. Searching for variants instead and grouping them to masters afterwards would solve this problem.

Access to the matching number of variants

With traditional model it's not possible to show number of matching variants in the listing where only the master products are listed. When we use the grouping approach the count would be naturally accessible.

novoj avatar Feb 24 '23 22:02 novoj