feat: search improvements — pagination, heading scroll, and body text indexing
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- typescript
- Domain
- api, backend-api-design, search
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.
Description
Problem
Several search limitations affect usability:
- Hardcoded LIMIT 20 — no pagination or cursor support for large result sets
- Heading matches don't scroll — clicking a heading result navigates to the page but doesn't scroll to the `#anchor`
- 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)
- 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
- Dominant language
- TypeScript
- Stars
- 2
- Forks
- 1
- Avg merge
- 12h 29m
- Merged PRs (30d)
- 12
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raystack/chronicle
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 4/5 3-5 days Newbie friendliness 65/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
All issues in raystack/chronicle
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·