Skip to content

Conversation

@Mpdreamz
Copy link
Member

@Mpdreamz Mpdreamz commented Jan 13, 2026

Full-Page Search Experience

This PR introduces a dedicated full-page search experience at /_search, providing users with a comprehensive way to search across all Elastic documentation.

cursorful-video-1768415289672.mp4

Features

Landing Page

  • Search-focused landing page with prominent search input
  • Suggested query cards for common questions (e.g., "How do I create an index?", "What is Elasticsearch?")
  • Popular searches section showing frequently searched terms
  • Recent searches dropdown for quick access to previous queries

Search Results

  • Paginated search results with relevance scoring
  • Result cards showing title, description, breadcrumb navigation, and last updated date
  • Highlighted search terms in results
  • Sort options: Relevance, Recent, Alphabetical

AI Answer Panel

  • Streaming AI-generated answers for semantic/question queries
  • Collapsible panel with "Ready!" indicator when answer is complete
  • Source citations linking to referenced documentation
  • Regenerate and stop controls during streaming

Filter Sidebar

  • Faceted filtering by content type, navigation section, and deployment type
  • Aggregation counts showing result distribution
  • "Show more" expansion for facets with many options
  • Active filter badges with one-click removal

Intelligent Query Handling

  • Automatic detection of semantic queries (questions, multi-word phrases)
  • Hybrid search combining lexical and semantic matching for questions
  • Optimized lexical-only search for keyword queries

Demo/Testing Modes

The following URL parameters enable testing of error states and edge cases:

Parameter Behavior
?fail=slow Simulates slow search (3 second delay) - shows loading spinner
?fail=slow_error Simulates slow search followed by server error
?fail=ai Simulates AI answer service unavailable
?fail=unavailable Simulates search service completely unavailable

Examples:

  • /_search?fail=slow - Test loading state on landing page
  • /_search?q=elasticsearch&fail=slow - Test loading spinner in results
  • /_search?q=elasticsearch&fail=slow_error - Test error state after delay
  • /_search?q=elasticsearch&fail=ai - Test AI unavailable with working search
  • /_search?fail=unavailable - Test service unavailable state

Backend Changes

  • New /api/v1/search endpoint for full-page search with pagination, filtering, and sorting
  • Refactored search infrastructure to share lexical query building between autocomplete (FindPage) and full search
  • Extracted common search utilities into SearchQueryBuilder and SearchResultProcessor

- Introduced `FullSearchGateway` with hybrid RRF search combining semantic and lexical queries.
- Added `FullSearchUsecase` to manage full-page search operations.
- Updated `MarkdownPageLayout` to support `FullSearch` layout.
- Improved query detection for semantic and keyword-based searches.
- Modified `ElasticsearchGateway` to use a unified client accessor.
- Extended serialization in `ApiJsonContext` for full search models.
- Implemented `IsExcluded` logic for configurable exclusion rules.
- Registered `FullPageSearchComponent` in frontend assets.
@Mpdreamz Mpdreamz self-assigned this Jan 13, 2026
@Mpdreamz Mpdreamz requested review from a team and cotti January 13, 2026 21:54
@Mpdreamz Mpdreamz changed the title feature/full search Add full-page search landing experience Jan 13, 2026
@github-actions
Copy link

github-actions bot commented Jan 14, 2026

🔍 Preview links for changed docs

Mpdreamz and others added 3 commits January 14, 2026 18:53
…ter sanitization

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@Mpdreamz Mpdreamz marked this pull request as ready for review January 14, 2026 18:30
@Mpdreamz Mpdreamz requested a review from a team as a code owner January 14, 2026 18:30
@Mpdreamz Mpdreamz merged commit 3c4559b into main Jan 15, 2026
30 checks passed
@Mpdreamz Mpdreamz deleted the feature/full-search branch January 15, 2026 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants