Lakion / SyliusElasticSearchBundle

ElasticSearch integration with advanced filtering options for Sylius eCommerce applications.
21 stars 44 forks source link

Exclusive filters (navigation) or inclusive filters? #9

Open gabiudrescu opened 7 years ago

gabiudrescu commented 7 years ago

I was wondering how are you going to address the need to have exclusive or inclusive filters. For example, at BestValue we have exclusive filters for navigation purposes whenever we are talking about taxons.

Given I have the the following products:
  |sku|taxon|
  |A|laptop|
  |B|smartphone|
  |C|laptop|
  |D|smartphone|
When I am on /listing/laptop
Then I should see the following products
  |sku|
  |A|
  |C|
But when I click "Smartphone" near "Taxons"
Then I should be on /listing/smartphone
And I should see the following products
  |sku|
  |B|
  |D|

You can either see smartphones or laptops - not both. It makes sense to have this behavior because you don't want to mix attribute filters from laptops with those from smartphones. Or jewelry with pet food.


Things are totally different whenever you are talking about attribute filters, where you want to be able to filter smartphones that have "Operating system" option with value "Android" AND "Network" with "4G".