Skip to main content

BANNED EXPRESSIONS

Overview

Banned Expressions allows you to block specific words or phrases from appearing as query suggestions. This is essential for maintaining quality and appropriateness in your search suggestions by filtering out unwanted, offensive, or irrelevant terms. This feature works in conjunction with your overall store configuration


Why Use Banned Expressions?

Banned expressions help you:

  • Remove offensive content - Block inappropriate or profane terms
  • Filter irrelevant queries - Remove nonsense or spam queries
  • Protect brand reputation - Prevent negative or sensitive terms
  • Improve suggestion quality - Keep only relevant, useful suggestions
  • Comply with policies - Meet content standards and regulations
  • Enhance user experience - Works with search interface optimization

Real-World Example: If users are searching for offensive terms or your system is suggesting irrelevant queries like random character strings, you can ban them permanently so they never appear in suggestions.


Accessing Banned Expressions

Banned Expressions

Tabs on the page:

  1. Overview & Settings
  2. Banned expressions (current tab)

Navigate between these tabs to configure your complete query suggestions system.


Page States

Empty State

Empty Banned Expressions State

When you first visit or have no banned expressions:

Action: Click the button to add your first banned expression.


Active State (With Banned Expressions)

Banned Expressions List

When you have banned expressions in the list:

Action Button:

  • "Add more to list" (cyan button, top right)
  • Click to add additional banned expressions

Banned Expressions List

Condition Types

Condition TypeBlocking MethodDescriptionExample
Query isExact match blockingBlocks the specific query exactly as writtenBan "fghj" → blocks only "fghj"
Query starts withPrefix-based blockingBlocks any query starting with the specified textBan "vbfg" → blocks "vbfg", "vbfgxyz", "vbfg123"
Matched regExpRegular expression pattern matchingAdvanced blocking using regex patternsBan "kj" → blocks any query matching the pattern

Expression Input Configuration

FieldDetailsValidationExamples
LabelText input field (right side)Cannot be empty, Must be valid (for regex patterns)Field for entering banned expressions
Placeholder"e.g. cocaines"Visual guide for usersShows example of what to enter
PurposeEnter the word, phrase, or pattern to banRequired field for all condition typesCore functionality for blocking unwanted queries
Query is ExamplesInput: inappropriate-termExact match validationResult: Blocks exact match "inappropriate-term"
Query starts with ExamplesInput: badPrefix validationResult: Blocks "bad", "badword", "badly", etc.
Matched regExp ExamplesInput: ^test.*$Regex pattern validationResult: Blocks any query starting with "test"

Description Text

Text: "Include a rule to remove unwanted queries"

Purpose: Reminds you what this feature does


Action:

  • Adds the expression to the banned list
  • Closes the dialog
  • Updates the total count
  • Expression takes effect immediately

Managing Banned Expressions

Deletion Process

StepActionDescriptionResult
1Locate the expressionFind the expression in the listExpression identified for removal
2Click red delete buttonClick the trash icon on the rightDeletion initiated
3Immediate removalExpression is removed immediately (no confirmation dialog)Expression deleted from system
ResultSystem updatesExpression is deleted permanently, total count updates, users can now see this query in suggestions again

How Banned Expressions Work

Processing Flow

User types search query

System checks banned expressions list

Does query match any banned expression?
├─ YES → Don't show as suggestion
└─ NO → Show in suggestions (if meets other criteria)

This process integrates with your search configuration and affects what users see in the browse interface.

Matching Logic

Query is (Exact):

Banned: "test"
Blocks: "test"
Allows: "testing", "Test", "test123"

Query starts with (Prefix):

Banned: "test"
Blocks: "test", "testing", "test123", "testuser"
Allows: "my test", "atest"

Matched regExp (Pattern):

Banned: "test.*"
Blocks: "test", "testing", "test123", "testanything"
Allows: "my test", "atest"

Content Guidelines

CategoryItems to BanItems to Avoid BanningReasonBest Practice
Language ContentOffensive or profane languageLegitimate product namesMaintain appropriate content standardsRegular review and community feedback
Adult ContentInappropriate adult content termsCommon search termsComply with content policies and user safetyUse comprehensive term lists
Quality ControlSpam or gibberish (like "asdfasdf", "fghj")Queries with high search volumeImprove suggestion relevancePattern-based blocking for efficiency
Business StrategyCompetitor brand names (if needed)Variations you haven't testedProtect business interestsCareful consideration of business impact
Policy ComplianceSensitive topics that violate policies-Meet regulatory requirementsLegal and policy team consultation
User ExperienceKnown problematic queries-Maintain positive user experienceData-driven decision making

Condition Type Selection Guide

Condition TypeBest Used WhenUse CasesExample ScenarioBenefits
Query isYou know the exact offensive termSimple one-word blocks, Most common use caseBan exact term "badword"Precise control, easy to implement
Query starts withBlocking a family of related termsCatching variations (plural, suffixes)"porn" blocks "porn", "pornography", "porns"Efficient for related term families
Matched regExpComplex pattern matching neededMultiple variations with one rule, Advanced filtering requirementsBlock all queries with 10+ consecutive numbersPowerful pattern matching, single rule for complex cases

Common Use Cases

Use CaseRecommended ConditionApproachExample Configuration
Block Offensive ContentQuery isUse exact matches for known offensive terms, add variations manually, regular review and updatesQuery is: offensive-term-1
Query is: offensive-term-2
Query is: offensive-term-3
Block Spam/GibberishMatched regExpUse regex patterns to catch random character combinations and keyboard mashingMatched regExp: ^[a-z]{1,3}$
(Blocks very short meaningless queries like "a", "bb", "ccc")
Block Competitor BrandsQuery starts withUse prefix matching to catch variations, block brand name and common misspellingsQuery starts with: competitor-brand
(Blocks "competitor-brand", "competitor-brand-shoes", etc.)
Block Adult ContentMultiple conditionsComprehensive list using exact matches, add variations and misspellings, regular expressions for patternsQuery is: adult-term
Query starts with: xxx
Matched regExp: (adult|porn|xxx).*

System Behavior

BehaviorDetailsImpactImportant Notes
Immediate EffectBanned expressions take effect immediatelyNo delay or index rebuild needed, users won't see banned queries instantlyReal-time blocking implementation
Case SensitivityGenerally case-insensitive (depends on implementation)"Test" and "test" typically treated the same, follows search configuration settingsUse regex for case-sensitive blocking if needed
No UndoDeleting an expression is permanentNo confirmation dialogCareful consideration required before deletion
  • Must re-add if deleted by mistake

Performance

  • Many banned expressions don't slow down suggestions
  • Efficient matching algorithms
  • Safe to add hundreds of expressions

Frequently Asked Questions (FAQs)

How quickly do banned expressions take effect?

Immediately. As soon as you click "Save", the expression is active and will block matching queries from suggestions.

Can I ban partial words or phrases?

Yes, use "Query starts with" for prefixes or "Matched regExp" for more complex partial matching.

What happens to existing suggestions that match a new ban?

They are immediately filtered out and won't appear to users anymore. However, if the suggestion exists in Analytics, it will still show there (but marked as unavailable).

Do banned expressions affect search results or just suggestions?

Only suggestions. Banned expressions don't affect the actual search results users see after searching. The actual search functionality remains in Browse interface.

Should I use exact matches or regex?

Start with exact matches ("Query is") for simplicity. Use regex only when you need pattern matching for multiple variations.

How many expressions can I ban?

The number of banned expressions you can add depends on your plan. You can add multiple expressions without experiencing performance issues, as the system uses efficient matching algorithms.

Can I ban multi-word phrases?

Yes, enter the full phrase in the expression input. Example: "inappropriate phrase here"

What if I accidentally ban a legitimate query?

Simply delete the expression from the list. The query will immediately become available in suggestions again.

Do banned expressions work across all languages?

Yes, they work for any language. Ban the expression in the specific language you want to block.