SmartMatch Search keeps the normal WordPress search results intact and surfaces
the most semantically relevant post(s) on top as a “Best match” suggestion.
Classic WordPress search matches keywords: when the words in the query do not
literally appear in a post, the visitor gets “nothing found” — even when your
site has exactly the right page. SmartMatch Search judges meaning instead, so
visitors can search the way they actually talk:
And it filters as well as it finds: a query like “burst viewer” will not match
a post just because the word “burst” appears somewhere — only posts that are
genuinely about the topic are suggested. The native results stay untouched
below the suggestion, so search never gets worse, only better.
The Burst Statistics integration exists for two reasons:
SmartMatch Search is a thin integration layer between two plugins:
WordPress\AI) — supplies the configured provider and text model.wpai_preferred_text_models filter.burst_uid cookie) and cookieless mode (session fingerprint).How it works on a search request (?s=...):
the_title). Because theIf the AI is unavailable, errors, or finds nothing relevant, nothing is added
and the normal results (or “nothing found”) are displayed as usual.
The plugin adds a “SmartMatch Search” item to the Burst settings menu
(Statistics Settings SmartMatch Search), with the options stored in the
Burst settings store:
Editing the prompt customization or excerpt length invalidates previously
cached rankings, so changes take effect immediately.
smartmatch_search_enabled (bool, WP_Query) — disable per query.smartmatch_search_is_validated_visit (bool, uid) — override the visit gate.smartmatch_search_post_types (string[]) — post types to search.smartmatch_search_candidate_limit (int) — override the configured numbersmartmatch_search_excerpt_words (int) — override the configured excerptsmartmatch_search_cache_ttl (int seconds, default 1 hour) — ranking cache.smartmatch_search_suggestion_count (int, default 1) — how many to surface.smartmatch_search_badge_label (string) — override the configured badgesmartmatch_search_badge_html (string) — replace the rendered badge markup;smartmatch_search_rate_limit (int, default 5) — AI searches per IP / window.smartmatch_search_rate_window (int seconds, default 5 min) — the window.smartmatch_search_daily_budget (int) — override the configured daily budget.smartmatch_search_debug (bool) — toggle debug logging (see Testing).wpai_preferred_text_models (from the AI plugin) — choose provider/model.smartmatch_search_ranked (action: ids, term, WP_Query) — observe results.smartmatch_search_rate_limited (action: term, WP_Query) — fired when an IPsmartmatch_search_budget_exceeded (action: term) — fired when an AI searchDefine SMARTMATCH_SEARCH_BYPASS_GATES as true (e.g. in wp-config.php) to disable
the visitor gates — the Burst uid validation and the per-IP rate limit — so AI
search runs without a tracked Burst visit. Useful for local testing or to verify
a production setup where no validated visit is available. It does NOT bypass the
dependency, main-query or relevance checks. Leave it undefined in normal use.
define( 'SMARTMATCH_SEARCH_BYPASS_GATES', true );
Define SMARTMATCH_SEARCH_DEBUG as true to log every point where AI search bails
out silently to the PHP error log (prefixed “[SmartMatch Search]”): missing
dependencies, no validated visit, rate limit hit, no AI credentials, provider
unsupported, SDK exception, unparseable response, nothing relevant, or the IDs
finally selected. When the constant is undefined, logging follows WP_DEBUG; the
smartmatch_search_debug filter can override it. Logging stays off in normal use.
define( 'SMARTMATCH_SEARCH_DEBUG', true );<h3>Rate limiting</h3>
To curb abuse and AI cost, each IP may run at most 5 AI searches per rolling
5-minute window (both filterable). Beyond that, the request falls back to normal
WordPress search. Only searches that trigger an actual model call count against
the limit: cached rankings are served freely. The visitor IP is resolved through
Burst’s own proxy-aware detector (Burst\Frontend\Ip\Ip::get_ip_address()) and
is only stored hashed.
Both the “AI” plugin and Burst Statistics (free) or Burst Pro must be active.
The AI plugin needs a configured provider with valid credentials.
The AI plugin is declared through the WordPress “Requires Plugins” header, so
WordPress itself enforces it on activation. The Burst requirement is enforced
at runtime instead (with an admin notice when missing): that header is an
AND-list of wordpress.org slugs, so it cannot express “Burst free OR Burst
Pro”, and Burst Pro is not distributed on wordpress.org. The plugin simply
stays inactive (and tells you why) until both are present.
SmartMatch Search does not connect to any service of its own and sends no data
to Burst or SmartMatch servers. When a search qualifies for AI ranking, the
search term and the candidate posts (post ID, post type, title and a short
excerpt of public, published content) are sent to the AI provider that you
yourself configured in the WordPress “AI” plugin — which provider that is
depends entirely on your configuration there, and its terms of service and
privacy policy apply to those requests. This happens only for validated human
visits, within the configured daily budget, and only when the ranking is not
already cached. No other data (no IP addresses, no visitor identifiers) is
included in these requests.