diff --git a/search.mdx b/search.mdx new file mode 100644 index 00000000..0006aa11 --- /dev/null +++ b/search.mdx @@ -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. +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. + + + {" "} + 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. + + +## 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.