feat: search improvements — pagination, heading scroll, and body text indexing
Open
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:
- 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
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.
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