Files
mintlify__docs/optimize/search.mdx
mintlify[bot] a253499e26 Apply SEO and metadata best practices (#6480)
* docs: improve SEO metadata for search configuration page

* Apply suggestion from @ethanpalm

---------

Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
2026-07-09 17:12:54 -07:00

136 lines
6.0 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Configure in-product search ranking, results, and filters"
sidebarTitle: "Search"
description: "Configure the in-product search bar on your Mintlify docs site: ranking boosts, maximum results per query, and product and version search filters."
keywords: ["search", "search ranking", "search boost", "boost", "search prioritization", "maximum search results", "max results", "searchable", "exclude from search", "filters"]
---
Configure how the search bar on your Mintlify-hosted documentation site behaves. These settings only affect in-product search. They do not change how external search engines index your pages.
## Boost search ranking
Use `boost` to bias the in-product search ranking of specific pages or sections. The value is a numeric multiplier applied to each chunk's relevance score: `boost: 3` makes a chunk three times as relevant as it would be without a boost.
### Boost a single page
Set `boost` in a page's [frontmatter](/organize/pages) to multiply its search ranking.
```mdx
---
title: "Custom domain"
description: "Connect your custom domain to your Mintlify documentation."
boost: 3
---
```
### Boost a navigation group
Set `boost` on a group in your `docs.json` navigation to apply the multiplier to every page under it.
```json
{
"navigation": {
"groups": [
{
"group": "Get started",
"boost": 5,
"pages": [
"quickstart",
"concepts"
]
}
]
}
}
```
A page inherits the boost factor from its nearest ancestor that sets one. A child page or nested group can override the inherited boost by setting its own `boost` value. A page's frontmatter `boost` always wins over a value inherited from the navigation.
### De-prioritize content
Use a value below `1` to push pages further down in search results. For example, `boost: 0.5` halves a page's relevance score relative to other pages. A `boost` of `1` is equivalent to no boost.
```mdx
---
title: "Deprecated API"
description: "Documentation for the deprecated v1 API."
boost: 0.25
---
```
<Note>
Boost factors compose with the existing relevance score. Use them sparingly. Large multipliers can cause less-relevant pages to dominate search results and degrade overall search quality.
</Note>
### Recommended boost range
`boost` accepts any positive number. In practice, keep values between `0.1` and `10`:
- `0.1``0.9`: de-prioritize legacy, deprecated, or supporting content.
- `1`: no change (equivalent to omitting `boost`).
- `2``5`: prioritize a key landing page, quickstart, or heavily used reference.
- `5``10`: reserve for a handful of top-level pages that should almost always appear first.
Avoid values greater than `10`. Very large multipliers overwhelm the underlying relevance score and cause boosted pages to appear in search results even when they don't match the query well.
## Exclude a page from search
Pages are searchable by default. The `searchable` field is optional and defaults to `true`. Set `searchable: false` in a page's [frontmatter](/organize/pages) to exclude it from your documentation site's search results. `searchable` is a page-level field only. To exclude every page under a navigation tab or group, hide the tab or group instead. See [Hidden pages](/organize/hidden-pages) for tab- and group-level controls.
```mdx
---
title: "Internal notes"
description: "Reference material we don't want surfacing in search."
searchable: false
---
```
Unlike `noindex`, `searchable: false` doesn't affect external SEO. The page is still:
- Crawlable by external search engines
- Listed in your `sitemap.xml`
It's removed from your documentation site's search results and the AI assistant context.
Use `searchable: false` for pages that should stay reachable through direct links or external search engines but shouldn't surface when users search inside your docs. Examples include deep reference pages, legacy content, and supporting material that would otherwise crowd out more relevant results.
To exclude a page from both in-product search and external indexing, use [`noindex: true`](/optimize/seo#disable-indexing) instead.
## Maximum search results
Control how many results the search bar returns per query from your dashboard. The default is `6` results. You can set any value between `1` and `100`.
Navigate to the [Search](https://app.mintlify.com/settings/deployment/search) settings page in your dashboard. In the "Maximum search results" section, set **Results per query** to your desired value.
<Frame>
<img
alt="The Search settings page in the dashboard with the Maximum search results stepper set to 6."
className="block dark:hidden"
src="/images/search-settings-light.png"
/>
<img
alt="The Search settings page in the dashboard with the Maximum search results stepper set to 6."
className="hidden dark:block"
src="/images/search-settings-dark.png"
/>
</Frame>
Higher values surface more matches per query, which is useful for sites with broad topic coverage where users expect to scan many candidates. Lower values keep the results panel compact and push users toward the top-ranked match.
## Search filters
<Note>
Search filters require an [Enterprise plan](https://mintlify.com/pricing?ref=search-filters).
</Note>
Search filters add product and version dropdowns to search results so users can narrow results to a single product or version. Filters are useful for sites that maintain distinct products or versions, where a search query might otherwise return matches across content the user isn't looking for.
Enable or disable search filters on the [Search](https://app.mintlify.com/settings/deployment/search) settings page in your dashboard.
Which dropdowns appear depends on your navigation configuration.
- The **product** filter appears when your navigation defines more than one [product](/organize/navigation#products).
- The **version** filter appears when your navigation defines [versions](/organize/navigation#versions).
If your navigation has neither products nor versions, enabling search filters has no visible effect.