elasticsuite icon indicating copy to clipboard operation
elasticsuite copied to clipboard

Facet Dependencies (Require Facet A to have >= 1 value selected, before facet B is shown)

Open davidhiendl opened this issue 3 years ago • 3 comments

When configuring facets it is currently not possible to configure dependencies between facets, eg. require that facet A has a value selected before facet B is shown.

Describe the solution you'd like Option in Catalog Attribute Config to specific 1 or more required facets, before a facet is shown.

Why is this useful: Some facets don't make any sense on their own or ambiguous when filtering products.

For example our store has a "Make Up Type" facet that splits the make-up products in several broad categories like Eyes, Complexion, Lips, etc. A second "Make Up Subtype" facet allows for customers to refine their choice even more.

This second facet is not very useful while the primary facet is not selected and has far to many options to be useful to customers without the primary facet.

davidhiendl avatar Aug 09 '21 14:08 davidhiendl

Hello @davidhiendl

Thanks for this idea, we will try to look into it in the future.

For this moment (for your goals) you could try to use Facet coverage rate during the configuration of your attributes. And you could get some info from our Wiki or from the official documentation of the Elasticsearch.

Also, you could look into this piece of code for a better understanding of how it works.

BR, Vadym

vahonc avatar Aug 13 '21 15:08 vahonc

Hello @davidhiendl,

To clarify @vahonc's comment, the attributes provider modifiers pool would be one place to add a class responsible for blacklisting the presence of attributes (after facet coverage has been applied) depending on the current request parameters.

It might be a bit rough around the edge, because the attribute filter model is supposed to determine which request variable it is supposed to look at.

Regards,

rbayet avatar Aug 16 '21 08:08 rbayet

I will take another look at it later this week.

davidhiendl avatar Aug 16 '21 09:08 davidhiendl