Hi I would like to do a refinement list but for one attribute, I explain : If I click on the checkbox it shows only the objects where this attribute isn’t NULL. How Can I Do that ? Thanks a lot
We don’t have faceting on
null as a value in our featureset, but what you can do is when indexing, index the
null values with another attribute
is_defined: false, then you can use
filters: 'is_defined:true, or whatever other naming makes sense for you. The other records will have
Does that help you?
Hi ! Thanks for responding so I created a variable thanks to scout and it worked !!! But just a simple question How can I change the name ? Because now I have True and False as name .
You can use a ternary for that, depending on what you’re toggling:
$is_defined = $maybe_defined_attribute ? 'value-for-true' : 'value-for-false';
Then you can filter on
It worked thank you !!