GLOSSARY

Boolean Search

Boolean search uses operators like AND, OR, and NOT to combine or exclude words. In online stores, it helps shoppers quickly broaden or narrow results and avoid zero matches.

What is Boolean Search?

Boolean search is a query method that combines terms with logical operators—most commonly AND, OR, and NOT (or a minus -)—to control which results appear. Many engines also support quotes for exact phrases and parentheses to group parts of a query.

How it works (quick guide)

  • AND – requires all terms: trail AND jacket.
  • OR – requires any term: sneakers OR trainers.
  • NOT / -excludes terms: red dress -silk or red dress NOT silk.
  • Quotesexact phrase match: "wireless charger".
  • Parenthesesset precedence: ("rain jacket" OR "hardshell") AND men.
  • Defaults – some stores treat spaces as AND; document your default in help text.

Why it matters in e-commerce

  • Reduces zero results: Use OR and synonyms to broaden strict queries.
  • Improves precision: Exclude unwanted attributes (e.g., refurbished, kids).
  • Better merchandising: Combine text queries with filters without surprises.
  • Power-user control: Expert shoppers resolve ambiguity fast (e.g., "gore-tex" OR gtx).

Best practices

  • Clear defaults & help: State whether space = AND; show examples near the search bar.
  • Safe parsing: Sanitize inputs; prevent query injection to your engine/logs.
  • Synonyms & typos: Expand queries before boolean logic to avoid false negatives.
  • Smart fallback: If logic yields zero results, auto-relax (drop NOT, switch to OR) and explain the change.
  • Grouping & phrases: Support ( ) and "; escape correctly in URLs.
  • Analytics: Track boolean usage vs. zero-result rate, CTR, and conversion by query type.

Challenges & trade-offs

  • Over-restriction: Too many AND/NOT terms can empty result sets.
  • User confusion: Mixed words vs symbols (NOT vs ) without documentation.
  • Language nuance: Stemming/lemmatization must not break phrase/NOT logic.
  • Performance: Deep boolean trees on large catalogs need good indexing and caches.

Examples (storefront)

  • nike (trail OR hiking) -kids → Nike trail/hiking shoes, excluding kids.
  • "winter coat" (down OR synthetic) AND waterproof → Specific materials with an exact phrase.
  • sofa OR couch → Broader recall via synonyms to avoid zero results.

Summary

Boolean search lets shoppers steer recall and precision with simple logic. With clear defaults, safe parsing, synonyms, and sensible fallbacks, it delivers relevant results faster—without sacrificing performance or trust.

FAQ

Boolean search vs Boolean operators?

“Boolean search” is the practice; the operators (AND/OR/NOT, quotes, parentheses) are the tools that power it.

Are operators case-sensitive?

Usually not, but uppercase improves readability. Symbols like - are literal.

Can customers mix operators with filters?

Yes. Operators affect the text query; facets/filters (size, price, stock) run alongside it.

What if a query returns zero results?

Relax logic automatically (e.g., swap AND→OR, drop a NOT), and show a notice of what changed.

Should we expose advanced operators (XOR/NEAR)?

Keep public UX simple. Add proximity (NEAR) only if your users need it.