Our query suggestion system automatically filters profanity from popular queries, but if you wish to filter out additional content (say a competitor’s name), you can blacklist either terms or regex by doing the following:
- Click Search in the navigation bar and click on the desired Search experience.
- Click Edit as JSON in the navigation bar to open your Search Configuration file.
- Within the
querySuggestions
object, add the terms within thepopularQueriesBlacklistedTerms
orpopularQueriesBlacklistedRegex
object depending on whether you want to blacklist terms or regular expressions:
-
popularQueriesBlacklistedTerms
if you have specific terms to blacklist. -
popularQueriesBlacklistedRegex
if you want to blacklist a regex pattern. Be sure to validate and test your regex using a tool like https://regex101.com.
-
Your JSON should use the following format:
"querySuggestions": {
"popularQueriesBlacklistedTerms": [
{
"term": "student loanbrokerage servicespay my loan log"
},
{
"term": "bad query"
}
],
"popularQueriesBlacklistedRegex": [".*bad word.*", "^\d{3}-\d{2}-\d{4}$"],
"universalPrompts": [],
"verticalPrompts": []
}
- You’ll need to wait for the site to re-index before this update will take place. Re-indexing happens on a nightly basis. For more information on popular queries and blacklisting them, visit the Query Suggestions unit.
Comments
0 comments
Article is closed for comments.