Skip to content

Conversation

@GaneshPatil7517
Copy link
Contributor

Fixes #1464

Changes:

  1. Added deduplication logic to filter out sub-page results when the parent page already matches the search query
  2. When searching for "sql", only "Components / SQL" appears instead of showing all sub-sections (allowNamedParameters, healthCheckConsumerEnabled, etc.)
    3.Increased Algolia hitsPerPage from 20 → 50 to get more results for proper deduplication
    4.Core docs continue to have priority over component pages

How it works:

  • First pass identifies parent pages that match the query directly
  • Second pass filters out sub-sections (URLs with # anchors) when parent page already matched
  • For component pages, only keeps the main entry (depth ≤ 2)

…esult cap

Truncates each search result description to 200 characters

Prevents result list overflow that hides other hits

Updated search result return limit from 5 to 10

Added CSS line-clamp for cleaner result display
- Add 200 character max length to search input (HTML + JS validation)
- Prioritize core documentation (manual, user-guide, architecture) over component pages
- Add CSS constraints (max-width, min-width) to prevent dropdown UI overflow
- Fetch more results (20) from Algolia then filter and sort to top 10
- Core docs patterns: /manual/, /user-guide/, /architecture/, /getting-started/, /faq/
- Component pages now rank lower in search results
@github-actions
Copy link
Contributor

github-actions bot commented Jan 6, 2026

🚀 Preview is available at https://pr-1466--camel.netlify.app

@GaneshPatil7517
Copy link
Contributor Author

Hey @davsclaus & @oscerd Thank you for approving the PR Excited to see it merged......

@davsclaus davsclaus merged commit dab0425 into apache:main Jan 6, 2026
1 check passed
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.

Search Box - Do not show repeat results for the same page

3 participants