Filter string not containing substring

I have a page that loads products and applies a filter. There is a small number of products that I would like not to show up on this page and the easiest way to do so would be to add an extra AND statement to the filter like “AND NOT name CONTAINS ‘value’”. But I can’t discover if this would be possible. Is it?

Hi Jasper,

This is totally doable. I recommend you have an attribute such as:

  • display: true/false"

on every product, then filter only on display: true using the filters (the facetFilters parameter for example)

Thanks!

Jason

Hi Jason,

I’ afraid this type of filtering will not do in this case. Category managers need to be able to filter away arbitrary string values, which I can only translate to booleans on a “string contains” basis.

To give some more context, we are listing Christmas cards that are sold by a partner producer. I import thousands of products from them. Tough luck causes some Christmas cards with some pretty dark humor to float to the top of the listing. Although I think they are pretty funny, I still want to enable the category team to exclude them. They all have the same string in their name, so I’d want to be able to exclude all entries that have that string in their name.