SyliusElasticsearchPlugin
SyliusElasticsearchPlugin copied to clipboard
ProductAttributes also from all Channels in Filter
If there are more than one channel and they have same taxonId, they all listed. I guess its better to list only what's in the channel available?
Could you provide a user story?
@bitbager I think this screenshot would explain it all better then longest user story :) Each book have single value in "Print year". This is screenshot from one of the channels, it shows only products for specific category and channel. Yet facets are build based on ALL products in this category, for all channels.
Is there any quick fix for that, the one that I can implement via decoration/override of your services? For example, by injecting HasChannelQueryBuilder into ProductAttributesByTaxonQueryBuilder and using it to build query?
EDIT: Well, I've tested this solution and it doesnt work. It seems that you're fetching values for attributes directly from database. Im new to elasticsearch, previously used solr, and there was facet generation based on products in query, so facets and values were not fetched from the database, but from solr. Does elasticsearch have similar feture? ( seems it does: https://stackoverflow.com/questions/14384736/elasticsearch-get-all-values-for-a-given-field/43096912 )