Posted on 23/08/2021 10:44:54
Hi Tomas,
Isn't that what you needed? That the list facet did not show when there are no "True" options?
The particularity with boolean fields is that they are not nullable booleans, so in the database null=false and unchecked=false, so they are all indexed the same way. This means you only really have 2 options; true or false. Using the technique of the List Facet, you get the Facet to only show up when there's at least 1 product with the value of "true" (the value shoulb be "true" but you can also try with "1").
If you need "nullable booleans", then you need to change this field to a dropdown field that have 2 options (true/false) and index them as text, so that "empty" does not match "false" when indexing.
Hope that makes sense.
Best Regards,
Nuno Aguiar