Overview
The Knowledge Base includes a built-in full-text search that queries article titles and body content. No external search engine or indexing service is required — queries run directly against the database using SQL LIKE matching.
How Search Works
When a client types a search term, Commerce runs a LIKE '%term%' query against:
- Article title (weighted higher — title matches appear first in results)
- Article body content
Only articles that are Published and belong to an Active category are returned. Draft articles and articles in inactive categories are excluded from all search results.
[!TIP] Because search uses
LIKEmatching, it finds partial word matches. A search forinvoicwill match "invoice" and "invoicing". Keep article titles close to natural language queries.
Search Bar in the Portal
The search bar appears in the portal header on KB pages. On the /kb index and individual category pages, it is prominently displayed. On other portal pages (dashboard, billing, etc.) the search bar may appear as a smaller icon-triggered input, depending on the portal theme.
Search results are displayed on a dedicated results page at /kb/search?q=your+query. Each result shows:
- Article title (linked)
- Category name
- A text excerpt from the article body
Showing or Hiding KB Search in Portal Settings
The KB search bar can be toggled in Admin → Settings → Client Portal → Features. If you have not yet populated the KB with enough articles to make search useful, disable it to avoid showing an empty results page.
Related Articles on the Ticket Open Page
This is the most impactful KB feature for reducing support load. When a client navigates to Open Ticket and begins typing a subject line, Commerce fires a live search against the KB and displays up to five matching articles in a panel below the subject field.
The client can click any suggested article to read it in a new tab without losing their ticket draft. If their question is answered, they can close the page without submitting.
| Threshold | Behaviour |
|---|---|
| 0 matches | Suggestion panel is hidden |
| 1–5 matches | Suggestion panel appears with article titles |
| 6+ matches | Only the top 5 results are shown |
[!IMPORTANT] Related article suggestions on the ticket page use the same title + body
LIKEquery. Make sure article titles use the vocabulary your clients use, not internal jargon. A client typing "email not working" will match an article titled "Troubleshooting Email Delivery Issues" but may miss one titled "SMTP Authentication Failures."
No Full-Text Index Required
Search performance is acceptable for typical Knowledge Base sizes (under a few thousand articles) without a dedicated full-text index. If your KB grows very large and search becomes slow, consider adding a MySQL FULLTEXT index to the kb_articles table's title and body columns. This is a database-level change and not required during normal operation.
Search and Article Visibility
| Article State | Appears in Search Results |
|---|---|
| Published, Public | Yes (all visitors) |
| Published, Clients-only | Yes (authenticated users only) |
| Draft | Never |
| Published, Category Inactive | Never |