Skip to content

Context-aware search results #41

Description

@katrinio

Search improvements

Context-aware search results

Current search always displays the milestone title.

Future idea:

  • if the match is in the title → highlight the matching text;
  • if the match is only in the description → show a short highlighted snippet below the title instead of making the user guess why the result matched.

Example:

First day in Belgrade ............... 2026-02-14
    ...migrated from PostgreSQL to SQLite...

Possible future architecture:

SearchResult(
    milestone: Milestone,
    matched_in: Literal["title", "description"],
    snippet: str | None,
)

This keeps search-specific logic out of Milestone and makes future features (highlighting, tags, ranking, full-text search) much easier to extend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions