Blacklist Terms

Online marketplaces may sell products of an adult nature that they don't want to display as autocomplete suggestions. Constructor.io's Blacklist API allows such marketplaces to exclude items matching objectionable terms from the autosuggest, but continue to include these products in search and/or product detail pages.

Blacklist Types#

Single-term Blacklist#

You may blacklist suggestions that match a single term.

Example: Blacklisting the term cat would prevent display of the cat in the hat.

Multi-term Blacklist#

You may blacklist suggestions that match all of a set of terms (a multi-term blacklist rule).

Example: Blacklisting the set of terms cats, bite and scratch, would prevent display of cats that bite and scratch, but not cats that bite.

Multi-term blacklist rules blacklist suggestions where all the terms appear in any order.

Example: Blacklisting the set of terms cats, bite and scratch, would prevent display of cats that scratch and bite (scratch comes before bite).

Blacklist Matching Logic#

  • Blacklisted terms are not case-sensitive.

Example: Blacklisting cats would prevent display of cats as well as Cats, CATS or any other variation.

  • Blacklists only operate on entire words, not substring matches.

Example: cats would not prevent display of wildcats.

  • Punctuation characters count as word separators.

Example: cats would prevent display of wild-cats.

  • Blacklists ignore stemming.

Example: cat would not prevent display of cats.