Skip to content

Add search weighting and ranking documentation#4593

Merged
sbawabe merged 7 commits intomainfrom
devin/1774630820-search-weighting-docs
Mar 28, 2026
Merged

Add search weighting and ranking documentation#4593
sbawabe merged 7 commits intomainfrom
devin/1774630820-search-weighting-docs

Conversation

@devin-ai-integration
Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration bot commented Mar 27, 2026

Summary

Adds a new "How results are ranked" section to the existing Search configuration page, documenting how Fern's Algolia DocSearch weighs and ranks search attributes. This was requested by a customer who wanted transparency into search behavior.

The new section uses an AccordionGroup with four expandable panels:

  • Attribute weighting — priority-ordered table of all 11 searchable attributes. Keywords are ranked feat(ci): Add stale-bot #1 (above page title).
  • Tiebreaking — custom ranking rules (date, version index, page position) and deduplication behavior
  • Page hierarchy — clarifies that navigation hierarchy doesn't affect ranking, but heading depth within a page does
  • Empty result handling — explains the allOptional fallback and which terms are treated as optional

Also updates the page's meta description. The attribute weighting and ranking details were derived from the actual Algolia configuration in fern-platform (set-index-settings.ts and types.ts).

Updates since last revision

  • Moved Keywords to priority feat(ci): Add stale-bot #1 in the attribute weighting table (above Page title), per reviewer request.
  • Resolved merge conflict with upstream changes that restructured the content into an AccordionGroup layout.

Review & Testing Checklist for Human

  • Verify keywords-first ranking is intentional — the docs now show Keywords as priority feat(ci): Add stale-bot #1, but the actual SEARCHABLE_ATTRIBUTES in types.ts lists title first. Confirm whether the Algolia config is being updated to match, or if the docs should reflect the current config order.
  • Check that internal links resolve — especially /learn/docs/configuration/page-level-settings#document-properties, /learn/docs/configuration/page-level-settings#title, /learn/docs/writing-content/markdown-basics#page-header, and /learn/docs/writing-content/components/code-blocks.
  • Preview the rendered page — verify the accordion components render correctly and the markdown table inside the "Attribute weighting" accordion displays properly.

Suggested test plan: Open the preview link, expand each accordion, click each internal link, and confirm the table renders with correct priority ordering.

Notes

  • This documents current implementation behavior. If the Algolia config in fern-platform changes, this page will need a corresponding update.
  • A changelog entry (2026-03-27.mdx) was added in an earlier commit.

Link to Devin session: https://app.devin.ai/sessions/c8f263074a264d729af53cbab8b8b5b0
Requested by: @devalog

Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 27, 2026

🌿 Preview your docs: https://fern-preview-devin-1774630820-search-weighting-docs.docs.buildwithfern.com/learn

Here are the markdown pages you've updated:

devin-ai-integration bot and others added 2 commits March 28, 2026 03:14
Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
…rst-ranked

Co-Authored-By: Devin Logan <devinannlogan@gmail.com>
@sbawabe sbawabe merged commit 27e342c into main Mar 28, 2026
2 checks passed
@sbawabe sbawabe deleted the devin/1774630820-search-weighting-docs branch March 28, 2026 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants