Skip to content

Search page #656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions search.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
title: "Search"
description: "Learn how our search ranks results and discover tips for structuring your content to improve its discoverability"
icon: "file-magnifying-glass"
---

## Search Result Ranking

Our search functionality combines two main techniques to deliver relevant results:

1. **Prefix Matching:** If your search query exactly matches the beginning of a word in the content (like searching for "insta" matching "install"), those results are given the highest priority.

Check warning on line 11 in search.mdx

View check run for this annotation

Mintlify / Mintlify Validation - vale-spellcheck

search.mdx#L11

Did you really mean 'insta'?
2. **Full-Text Search:** For broader matches, our search scans your entire content to find results based on the words present in the content.

### Boosting Relevance

To ensure the most important content surfaces first, we apply boosts:

- **Page Titles:** Titles receive the most significant boost as they usually represent the main topic of a page.
- **Sub-headings:** Headings within a page are also boosted, but to a lesser extent, to highlight key sections.

### Content Chunking

To provide more granular and relevant results, search operates on content "chunks." Content is broken down as follows:

- **Page-level:** The title and description of each page form a primary chunk.
- **Section-level:** Each heading and the content immediately following it create additional, more specific chunks. This helps users find the most relevant section within a page.

<Note>
{" "}
Content appearing before the first heading on a page, or on pages without any headings,
is associated with the main page-level chunk for search purposes.
</Note>

## Version and Language Filtering

Search results are automatically filtered based on the version and language you have selected for browsing the documentation.
Results will also include content not specific to any version that matches the query.

## Optimizing Content for Search

Here are some recommendations for structuring your content to work well with our search features:

- **Use Clear and Descriptive Titles:** Ensure titles accurately reflect the page's main topic and include terms users are likely to search for.
- **Structure with Headings:** Utilize headings to break down content logically and create effective searchable chunks. Clear headings make content easier to understand.
- **Include Relevant Keywords:** Incorporate the words and phrases your audience is likely to use naturally within your sentences.
- **Keep Sections Focused:** Ensure the text under each heading directly relates to that topic to improve the accuracy of search results pointing to specific sections.
- **Write Concise Descriptions:** Craft clear page descriptions that summarize the content and include primary keywords.