Redocly Docs Search Configuration: A Practical Guide
Quick answer: Redocly builds a search index from your Markdown, API descriptions, and code samples at build time, and you configure it through the search block in redocly.yaml. Pick the default FlexSearch engine for simple group facets, or switch to Typesense on Scale and Enterprise for full faceted filtering.
There are two search layers, not one
Most configuration mistakes come from treating portal search and reference-docs search as the same thing. The portal search box queries the whole project: guides, Markdown pages, and API references together. The reference-docs settings only shape how a single OpenAPI description is indexed and displayed.
The product generations also differ. The current platform uses the search block in redocly.yaml plus a named engine. The legacy portal enabled the box with a - search: true entry in the nav list and exposed separate reference-docs options. Mixing the two syntaxes is the fastest way to get a config that does nothing.
Choose the engine first
The engine decides what facets and ranking behavior you can use, so settle it before tuning individual options.
| Factor | FlexSearch | Typesense |
|---|---|---|
| Status | Default engine | Advanced engine |
| Facets | Group facet only | Full faceted configuration |
| Plan | Included on Pro | Requires Scale or Enterprise |
| Best fit | Small to mid docs | Large catalogs with filtering |
| Setup | Works out of the box | Set engine to typesense |
You set the engine with the engine field, which accepts flexsearch or typesense. Staying on FlexSearch is the right default until you actually need readers to filter results by more than one facet.
What the search block controls
On the current platform, the search block covers both the modal behavior and ranking. You can hide the bar, add keyboard shortcuts, suggest pages in the modal, define facets, boost the ranking of pages for specific terms, and prevent pages from appearing for given terms. The same options accept page-level overrides through front matter, so a single page can opt out without a global change.
The ranking controls are where real tuning happens. A boost raises a page for a chosen term when you know readers use vocabulary that differs from your headings; a block rule keeps internal or draft pages out of results. Treat these as targeted fixes for known queries, not a way to rewrite relevance across the whole site.
Reference-docs indexing knobs
For a single API description, the legacy and reference options control how deep the index goes into nested content.
| Option | Default | What it does |
|---|---|---|
| searchMaxDepth | 1 | Nested $ref levels indexed, from 1 to 10 |
| searchMode | default | Set path-only to index operation paths alone |
| searchAutoExpand | true | Expand schemas and highlight matches in results |
| searchFieldLevelBoost | 0.95 | Lower ranks for matches at deeper levels |
The default searchMaxDepth of 1 means deeply referenced schemas stay out of the index until you raise it. Raising it helps readers find nested fields, but it also grows the index, so increase it only for descriptions where those fields are genuinely queried.
Honest limits
Because the index is built at build time, a newly edited page is not searchable until the next build completes; there is no live reindex as you type. Typesense and the full facet set sit on paid plans, so confirm the tier before promising filters to internal readers. And search helps readers locate content; it does not tell you whether a change broke a contract. For that, a desktop tool such as Powerduck reviews the local Git diff and runs scenario tests against the API. For more on how the tools line up, see the comparison hub.
Frequently asked questions
Do I need Typesense? Not by default. FlexSearch covers the group facet and works without extra setup. Move to Typesense only when readers need to filter by several facets across a large catalog.
How do I keep a page out of search? Use the page-level front matter override, or the block rule in the search block, rather than deleting the page. This keeps the content published while removing it from results.
Why are nested schema fields missing from results? searchMaxDepth defaults to 1, so content added through nested $ref is not indexed. Raise the value toward 10 for descriptions where readers actually search those fields.
When does a new edit become searchable? At the next build, since Redocly generates the index at build time. Verify the build finished before testing a new query.
The bottom line
Start with the engine decision, not the ranking tweaks: FlexSearch for most projects, Typesense when you need real facets. Keep the modern search block separate from the legacy reference-docs knobs, and change searchMaxDepth only where nested fields are queried. A search box that returns every page is no better than one that hides the right one, so tune against concrete reader queries instead of guessing.