Docs
← Back to site

How Frontend Search Works

3 min readUpdated October 29, 2026

The search box in the topbar (see Sidebar & Topbar Overview) is live by default, with no separate setup required. This doc covers what happens after a reader starts typing.

Typing and results#

Results start appearing after 2 characters, with a short 180ms pause after each keystroke before searching, so a fast typist doesn’t trigger a request per letter. Only the most recent request matters; if you keep typing, any still-in-flight search from a moment ago is cancelled rather than potentially overwriting the results with stale data.

Each result shows the doc’s title, a product › category breadcrumb, and a short excerpt with your search term highlighted in both the title and excerpt.

The docs search box with results for "email", each with a product and category trail and the match highlighted.

Search scope#

If you have more than one product, a scope dropdown appears next to the search box (hidden in single-product mode, and not shown on the docs index):

  • This product: the default, searches only the product you’re currently viewing.
  • All products: searches every product at once.
  • A specific other product: every other product, organized by your product groups if you’ve set any up (see Product Groups), each group shown as its own labeled section in the dropdown. If you haven’t configured any groups, every other product is listed under a single “Other products” section instead.

Which search engine is used#

By default, this uses WordPress’s own built-in search, scoped to just your docs. If you have a dedicated search plugin active, WP Super Docs automatically upgrades to it instead, in this order:

  1. Algolia or Elasticsearch, if you’ve connected one (see Connecting Algolia or Connecting Elasticsearch / Elastic Cloud).
  2. SearchWP, if active.
  3. Relevanssi, if active. WP Super Docs also tells Relevanssi to index your docs and their product/category taxonomies automatically.
  4. WordPress’s native search, enhanced automatically if Ivory Search or Search Exclude is active, since both of those work by modifying WordPress’s own search rather than replacing it.

You don’t need to configure anything for this to work, whichever of these plugins is active and highest in this list is simply used.

Every search is logged#

Each search term and how many results it returned are recorded for Search Analytics, so you can see what readers are searching for, including searches that came up empty. See Search Analytics: Top, Failed & Zero-Result Queries.

Internal-only docs in results#

For visitors who aren’t logged in, an internal-only doc still shows up in results with its title and link, but without an excerpt. See Making Docs, Categories, or Products Internal-Only for what else is hidden.

A note for sites with aggressive full-page caching#

Search requests are protected by a WordPress security nonce. If your caching plugin caches a page for longer than a nonce’s lifetime (24 hours by default), visitors served that stale cached page would be sending an expired nonce.

The search handles this on its own: when a request is rejected because the nonce has expired, it fetches a fresh one from a REST endpoint that’s never cached (/wp-json/wpsd/v1/nonce) and retries once. There’s nothing to configure, and no need to keep your cache TTL under 24 hours for search’s sake.

Was this helpful?

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only