cancel
Showing results for 
Search instead for 
Did you mean: 

Filter on custom attributes - elasticsearch

Filter on custom attributes - elasticsearch

Hello,

 

I have a project where I have a lot of configurable products and I need to make some filters there. I've manage to make the filters and everything related but the issue is that when I apply filters 

 

I am getting that for size 34 there are 22 products in total and from those, there are 22 products with stock_custom filter on "In stock"  and 18 with "Out of stock". The "Out of stock" value is ok, but the "In stock" value is not because is showing me the total count of products and is not taking into consideration the size filter.

 

I want to mention that the size filter is the super attribute for configuration so it should get the simple products with "stock_custom" values.

 

What do I do wrong here?