• 
      

    Search: Add faceted search view routing and templates

    Review Request #15054 — Created May 13, 2026 and updated — Latest diff uploaded

    Information

    Review Board
    release-8.x

    Reviewers

    Updates RBSearchView and adds the templates and CSS for the new faceted
    search results page.

    RBSearchView.dispatch now checks whether the active backend exposes
    get_es_client. If it does, a FacetedSearchEngine is constructed and
    _use_faceted is set to True. Any exception during construction falls back
    silently to the existing Haystack path. Numeric queries still redirect directly
    to the matching review request when accessible.

    get_template_names returns search/results.html for the faceted path and
    search/results_legacy.html for the Haystack path.

    get_context_data on the faceted path calls FacetedSearchEngine.search,
    builds the group sidebar items with total counts, resolves human-readable
    labels for searchable filter buckets (reviewer, group, repository), and
    assembles the filter panel context including current values, bucket lists, and
    option counts.

    results.html is the new template for the faceted path, providing the filter
    sidebar and results list. results_legacy.html is the existing template
    renamed, unchanged in behaviour.

    search.less adds styles for the filter sidebar, bucket counts, active filter
    indicators, and the Contents filter checkbox group.

    _comment.html and _group.html are new partial templates for rendering
    comment and group search results inline.

    Verified that dispatch correctly routes to the faceted path when
    Elasticsearch is available and falls back silently to the Haystack path when it
    is not or when engine construction fails. Verified template selection, user
    attachment on search hits, numeric query redirection, and Whoosh wildcard
    rewriting. Confirmed the existing Haystack path is unaffected.

    Commits

    Files