raystack / raystack/chronicle

feat: search improvements — pagination, heading scroll, and body text indexing

Open
#129 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
2
Forks
1
Avg merge
12h 29m
Merged PRs (30d)
12

Description

Problem

Several search limitations affect usability:

  1. Hardcoded LIMIT 20 — no pagination or cursor support for large result sets
  2. Heading matches don't scroll — clicking a heading result navigates to the page but doesn't scroll to the `#anchor`
  3. Static index only indexes headings — `build-search-index.ts` extracts headings but not prose body text, making full-text search incomplete (the runtime FTS index in `search.ts` does index body text, but the two are inconsistent)
  4. BM25 weights are undocumented magic numbers — `bm25(search_fts, 10.0, 5.0, 1.0)` with no explanation of tuning rationale

Suggested Improvements

  • Add `offset`/`limit` query params to the search API
  • After navigating to a heading result, scroll the anchor into view on the client
  • Unify the two search indexing paths (static builder vs runtime builder)
  • Document or make configurable the BM25 weight tuning

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading build-search-index.ts and search.ts to compare the static and runtime indexing paths, then trace the search API and client navigation for the existing LIMIT 20 and heading-result behavior. Done means pagination parameters work, heading links scroll to their anchors, body text is indexed consistently, and the BM25 weights are documented or configurable.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design, search
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.